GNOME Bugzilla – Bug 721622
Headerbar image-buttons are 1px larger than text-buttons
Last modified: 2014-03-10 08:15:46 UTC
If you have a text button near a symbolic image buttons in a headerbar you will notice that they have a 1px height difference. I guess this went unnoticed since most new apps have just [ New ] on the left and the symbolic buttons on the right, but if you have them near it becomes evident. a patch like .header-bar .button.image-button { - padding: 5px 4px 5px 5px; + padding: 5px 4px 4px 5px; } solves the inconsistency, but it looks suspicious... why does a sqare icon need different padding on different sides? note there was a 4px even before my patch... is it due to some rounding done by gtk when drawing the icon?
Created attachment 265445 [details] [review] patch According to Allan: <aday> the buttons are 34 x 35 - with the extra pixel of height being taken away from the padding beneath So this patch instead adds an extra px of padding to the text-buttons so they are the same height as the image-buttons
Created attachment 265446 [details] [review] patch After discussing this, I think the problem was an actual bug in the padding of image buttons, since it by mistake removed 1px from the right padding instead of the bottom. This should also fix bug #708802
Created attachment 265449 [details] [review] modified This is a slightly modified version (I'd prefer text labels to be up 1px rather than down 1px) of the first patch. It requires the following patch from bug 708802: https://bug708802.bugzilla-attachments.gnome.org/attachment.cgi?id=265448 I think the uneven internal padding inside image buttons was actually irrelevant to this particular bug.
(In reply to comment #3) > I think the uneven internal padding inside image buttons was actually > irrelevant to this particular bug. Well, the point is that if the second patch is applied, we do not need to increase the text buttons at all
Addressed in a7c84d82a39947925f2671f6504cdc96deceb3c3
Created attachment 265732 [details] screenshots (In reply to comment #5) > Addressed in a7c84d82a39947925f2671f6504cdc96deceb3c3 I'm not sure that this had the right result. See the attached screenshots - header bar buttons in master now aren't square because they are missing 1px from their height. The bottom image in the attachment shows the header bar with the patches I proposed.
Reopening since I can still see the issue described in comment 6.
Created attachment 269384 [details] the current git master has square icon buttons, but they are a pixel shorter than the text buttons
Created attachment 269386 [details] [review] headerbar: match pixel height for image buttons - chasing the single pixel difference. of couse solving this with padding is a little futile in that the font size will break it.
Attachment 269386 [details] pushed as fb862eb - headerbar: match pixel height for image buttons