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 707999 - HeaderBar height increases when the subtitle label is set and visible
HeaderBar height increases when the subtitle label is set and visible
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: Other
3.9.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
3.12
Depends on:
Blocks:
 
 
Reported: 2013-09-12 23:11 UTC by Yosef Or Boczko
Modified: 2014-02-17 12:25 UTC
See Also:
GNOME target: ---
GNOME version: 3.9/3.10


Attachments
Screenshot - gnome-clocks world (202.59 KB, image/png)
2013-09-12 23:11 UTC, Yosef Or Boczko
Details
Screenshot - gnome-clocks city (120.45 KB, image/png)
2013-09-12 23:12 UTC, Yosef Or Boczko
Details
Screenshot - too much space (120.23 KB, image/png)
2013-09-16 17:28 UTC, Yosef Or Boczko
Details
Screenshot - gnome-clocks just in English with Cantarell 11 (120.47 KB, image/png)
2013-09-16 17:53 UTC, Yosef Or Boczko
Details
modified screenshot (279.21 KB, image/png)
2014-01-07 12:59 UTC, Allan Day
Details

Description Yosef Or Boczko 2013-09-12 23:11:24 UTC
Each application which use GtkHeaderBar and set title
(also title without subtitle), is too height.

For example, gnome-clocks in the overview (there isn't title,
have stack instead), the height is good.
In city page, have title (and subtitle, in this case), and the
headerbar is too height.

See screenshots.
Comment 1 Yosef Or Boczko 2013-09-12 23:11:57 UTC
Created attachment 254824 [details]
Screenshot - gnome-clocks world
Comment 2 Yosef Or Boczko 2013-09-12 23:12:18 UTC
Created attachment 254825 [details]
Screenshot - gnome-clocks city
Comment 3 Matthias Clasen 2013-09-13 10:49:45 UTC
This is because title+subtitle require this much height. Either we need to come up with a more cramped design for those two, or give up on two-line titles.
Comment 4 John Stowers 2013-09-15 20:02:06 UTC
So should I work around this in gnome-tweak-tool and pack my own label?
Comment 5 Yosef Or Boczko 2013-09-16 12:43:35 UTC
(In reply to comment #4)
> So should I work around this in gnome-tweak-tool and pack my own label?

I not understand what gnome-tweak-tool relate to this bug?
Comment 6 Matthias Clasen 2013-09-16 17:23:54 UTC
(In reply to comment #4)
> So should I work around this in gnome-tweak-tool and pack my own label?

Here is what the headerbar docs say:

 * Note that GtkHeaderBar always reserves room for the subtitle, even
 * if none is currently set. If this is not desired, use
 * gtk_header_bar_set_custom_title().
Comment 7 Yosef Or Boczko 2013-09-16 17:28:44 UTC
Created attachment 255050 [details]
Screenshot - too much space

(In reply to comment #6)
> (In reply to comment #4)
> > So should I work around this in gnome-tweak-tool and pack my own label?
> 
> Here is what the headerbar docs say:
> 
>  * Note that GtkHeaderBar always reserves room for the subtitle, even
>  * if none is currently set. If this is not desired, use
>  * gtk_header_bar_set_custom_title().

I think GtkHeaderBar saved too much room for the subtitle.
See the screenshot.
Comment 8 Matthias Clasen 2013-09-16 17:32:15 UTC
Cosimo, any opinion on adding a way to 'unreserve' the subtitle space ?
Comment 9 Cosimo Cecchi 2013-09-16 17:41:54 UTC
Matthias, as you said I think if people want to avoid that, they should pack their own title widget. I don't think it buys us anything to make it easier than that.

I think the problem here might be that the Hebrew font used by Yosef has a larger height than the usual Cantarell, and the vertical paddings become inconsistent between the two views - the header bar shouldn't change size between different pages.
Comment 10 Yosef Or Boczko 2013-09-16 17:53:49 UTC
Created attachment 255056 [details]
Screenshot - gnome-clocks just in English with Cantarell 11

(In reply to comment #9)
> I think the problem here might be that the Hebrew font used by Yosef has a
> larger height than the usual Cantarell, and the vertical paddings become
> inconsistent between the two views - the header bar shouldn't change size
> between different pages.

I think isn't relate to font Hebrew - also in English (Cantarell 11, of course)
I get size different between the two views.
Comment 11 John Stowers 2013-09-16 17:59:39 UTC
(In reply to comment #5)
> (In reply to comment #4)
> > So should I work around this in gnome-tweak-tool and pack my own label?
> 
> I not understand what gnome-tweak-tool relate to this bug?

Its just a +1 to your list of applications that cannot use the (simple) headerbar api without looking different to the rest.
Comment 12 John Stowers 2013-09-16 18:02:10 UTC
(In reply to comment #9)
> Matthias, as you said I think if people want to avoid that, they should pack
> their own title widget. I don't think it buys us anything to make it easier
> than that.

If I pack my own label I guess I need to add the style class (title?) that renders the font bold, like the other header bars. Is that correct?
Comment 13 Matthias Clasen 2013-09-18 13:38:50 UTC
(In reply to comment #12)

> If I pack my own label I guess I need to add the style class (title?) that
> renders the font bold, like the other header bars. Is that correct?

If you want the same style for the title, yes.
Comment 14 Allan Day 2013-09-19 10:15:09 UTC
(In reply to comment #9)
...
> I think the problem here might be that the Hebrew font used by Yosef has a
> larger height than the usual Cantarell, and the vertical paddings become
> inconsistent between the two views - the header bar shouldn't change size
> between different pages.

I think it's a more general problem - the header bar gets taller even with Cantarell. We have a few other bugs that I reported about this:

 bug 706485 - contacts - HeaderBar is too tall
 bug 706515 - gtk+ - HeaderBars are sometimes too tall
 bug 706431 - gnome-themes-standard - HeaderBar grows taller in clocks view

Maybe we need to give up on the idea of having sub-headings inside header bars...
Comment 15 Emmanuele Bassi (:ebassi) 2013-09-19 11:02:12 UTC
re-titling for clarity
Comment 16 Allan Day 2014-01-07 12:59:00 UTC
Created attachment 265532 [details]
modified screenshot

After experimenting with this, it seems that it is possible - at least visually - to fit in a sub-heading within the desired spacing. This can be seen in the attachment, which is a modified screenshot of gedit redesign branch.
Comment 17 Allan Day 2014-02-17 12:25:17 UTC
Thanks so much for fixing this, Matthias.