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 706500 - HeaderBars - adjust padding
HeaderBars - adjust padding
Status: RESOLVED FIXED
Product: gnome-themes-standard
Classification: Core
Component: Adwaita GTK3 theme
3.9.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-themes-standard-maint
gnome-themes-standard-maint
Depends on:
Blocks:
 
 
Reported: 2013-08-21 13:35 UTC by Allan Day
Modified: 2013-08-25 19:41 UTC
See Also:
GNOME target: ---
GNOME version: 3.9/3.10


Attachments
modified screenshot (32.84 KB, image/png)
2013-08-21 13:35 UTC, Allan Day
  Details
simple patch (775 bytes, patch)
2013-08-21 13:42 UTC, Allan Day
none Details | Review
updated patch (1.04 KB, patch)
2013-08-21 13:50 UTC, Allan Day
committed Details | Review

Description Allan Day 2013-08-21 13:35:07 UTC
Created attachment 252553 [details]
modified screenshot

I've been working on refining the layout of header bars. Guidelines are here:

https://wiki.gnome.org/Design/Whiteboards/HeadeBarGuideline

In some cases, like Clocks, the apps are relying purely on Adwaita and GTK to set the layout. However, I'm struggling to figure out why the layout is the way it is. Header bars are set to have vertical and horizontal padding of 6px (in GTK), but it is more than that in the examples I've seen, and I can't see anything in Adwaita that would change it.

I've attached a screenshot of Clocks from master, along with a modified version which shows the desired layout.
Comment 1 Allan Day 2013-08-21 13:42:56 UTC
Created attachment 252555 [details] [review]
simple patch

Ah ha, figure it out!
Comment 2 Allan Day 2013-08-21 13:44:16 UTC
Not sure if this will mess up titlebars under CSD though... (same story as bug 706418).
Comment 3 Allan Day 2013-08-21 13:50:12 UTC
Created attachment 252557 [details] [review]
updated patch

The extra 1px padding for HeaderBars was throwing things off.
Comment 4 Andreas Nilsson 2013-08-21 14:20:37 UTC
The header bar probably needs to have 1px shorter padding below than above, since the highlights under the buttons, while _actually_ being part of the button, visually looks like it belongs to the header.
So that way, we'll end up with something that looks like it's 6px above and 6px below the button, while the actual css numbers are 6px above and 5px below.
Comment 5 Andreas Nilsson 2013-08-21 14:25:31 UTC
https://dl.dropboxusercontent.com/u/5031519/clocks-header.png
is a example of actually 6px above and 6px below

https://cloud.gnome.org/public.php?service=files&t=9255c5ae7605925e3a6d31d01304eb7f
is a example of having 6px above and 5px below (but yeah, visually 6 above and 6 below)
Comment 6 Jakub Steiner 2013-08-21 14:34:18 UTC
Unfortunately the side effect of this is that the close button in the CSD gtk3-demo lacks any margin.
Comment 7 Cosimo Cecchi 2013-08-22 15:09:24 UTC
Allan's patch is correct here - the bug mentioned by Jakub by running GTK_CSD=1 gtk3-demo is a different one, and should be fixed in GTK+ itself (I have a patch).

I pushed that to master now.
Comment 8 Allan Day 2013-08-22 15:22:02 UTC
Thanks so much!
Comment 9 Allan Day 2013-08-25 19:41:38 UTC
(In reply to comment #4)
> The header bar probably needs to have 1px shorter padding below than above,
> since the highlights under the buttons, while _actually_ being part of the
> button, visually looks like it belongs to the header.
> So that way, we'll end up with something that looks like it's 6px above and 6px
> below the button, while the actual css numbers are 6px above and 5px below.

I had a look into doing this. Ideally we would do it in CSS using margin properties, but it doesn't seem that GTK has support for that. :/