After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 721622 - Headerbar image-buttons are 1px larger than text-buttons
Headerbar image-buttons are 1px larger than text-buttons
Status: RESOLVED FIXED
Product: gnome-themes-standard
Classification: Core
Component: Adwaita GTK3 theme
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-themes-standard-maint
gnome-themes-standard-maint
3.12
Depends on:
Blocks:
 
 
Reported: 2014-01-06 10:49 UTC by Paolo Borelli
Modified: 2014-03-10 08:15 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (782 bytes, patch)
2014-01-06 14:54 UTC, Paolo Borelli
none Details | Review
patch (892 bytes, patch)
2014-01-06 15:08 UTC, Paolo Borelli
none Details | Review
modified (868 bytes, patch)
2014-01-06 15:54 UTC, Allan Day
none Details | Review
screenshots (127.17 KB, image/png)
2014-01-08 18:07 UTC, Allan Day
  Details
the current git master has square icon buttons, but they are a pixel shorter than the text buttons (42.81 KB, image/png)
2014-02-17 13:03 UTC, Jakub Steiner
  Details
headerbar: match pixel height for image buttons (1.40 KB, patch)
2014-02-17 13:26 UTC, Jakub Steiner
committed Details | Review

Description Paolo Borelli 2014-01-06 10:49:54 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?
Comment 1 Paolo Borelli 2014-01-06 14:54:56 UTC
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
Comment 2 Paolo Borelli 2014-01-06 15:08:16 UTC
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
Comment 3 Allan Day 2014-01-06 15:54:35 UTC
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.
Comment 4 Paolo Borelli 2014-01-06 16:05:13 UTC

(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
Comment 5 Jakub Steiner 2014-01-06 17:10:01 UTC
Addressed in a7c84d82a39947925f2671f6504cdc96deceb3c3
Comment 6 Allan Day 2014-01-08 18:07:51 UTC
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.
Comment 7 Allan Day 2014-01-16 15:49:38 UTC
Reopening since I can still see the issue described in comment 6.
Comment 8 Jakub Steiner 2014-02-17 13:03:52 UTC
Created attachment 269384 [details]
the current git master has square icon buttons, but they are a pixel shorter than the text buttons
Comment 9 Jakub Steiner 2014-02-17 13:26:51 UTC
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.
Comment 10 Jakub Steiner 2014-03-10 08:15:42 UTC
Attachment 269386 [details] pushed as fb862eb - headerbar: match pixel height for image buttons