Skip to content

icon-location messes up the text position #620

@c5took

Description

@c5took

Using a vertical icon-location (i.e. top or bottom) messes up the position of the text, centering the whole text vertically.

This works fine until you try to use anything other than text-alignment=left

Image

As seen in the screenshot, this happens even when there's no icon.

I've tracked down the issue to right here

mako/render.c

Lines 312 to 316 in d3941db

if (icon_vertical) {
text_x = (notif_width - text_width - border_size) / 2;
} else {
text_y = (notif_height - text_height - border_size) / 2;
}

Removing those lines would fix the issue, but these were added on the same PR that added the icon-location option, so it seems like this could have been a concious decision?

It certainly could be considered a feature, as it centers the text without messing up with the actual text-alignment, I'm thinking it could be separated into it's own option (possibly content-alignment?) but that's it's own issue, either way it clearly doesn't belong here, but I'm not sure if removing it could break a few setups.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions