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 761435 - Themes use absolute dimensions, not relative, don't adapt to font size
Themes use absolute dimensions, not relative, don't adapt to font size
Status: RESOLVED OBSOLETE
Product: gtk+
Classification: Platform
Component: Themes
3.22.x
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
: 761693 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2016-02-01 23:06 UTC by Lukas
Modified: 2018-05-02 16:55 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
observe text area height (20.25 KB, image/png)
2016-02-01 23:06 UTC, Lukas
  Details
inspector: add slider for adjusting the font scale (6.05 KB, patch)
2016-03-25 12:51 UTC, Christoph Reiter (lazka)
committed Details | Review

Description Lukas 2016-02-01 23:06:47 UTC
Created attachment 320239 [details]
observe text area height

Gtk 3.19 uses min-height to set the height for widgets like entries. When using a 11pt font (like gnome apparently does) things don't change. Other Desktop environments like Xfce use 10pt default font size. This makes widgets appear unnecessarily large.

See attachment for comparison between Gtk 2, Gtk 3.18 and master.

Possible fix: decrease min-height to suit 10pt font size or revert to sizing determined by padding.
Comment 1 Christoph Reiter (lazka) 2016-02-02 08:28:04 UTC
Annoys me as well (also gtk3-widget-factory no longer fits on my screen)

"min-height: 2em;" looks much nicer here. Maybe use that instead of fixed size heights?
Comment 2 Matthias Clasen 2016-02-02 09:10:54 UTC
(In reply to Lukas from comment #0)
> Created attachment 320239 [details]
> observe text area height
> 
> Gtk 3.19 uses min-height to set the height for widgets like entries. When
> using a 11pt font (like gnome apparently does) things don't change. Other
> Desktop environments like Xfce use 10pt default font size. This makes
> widgets appear unnecessarily large.

While those other desktops could just ship a theme that suits their needs and font size, Adwaita should probably be somewhat reactive to font size changes in both directions. Over to Lapo
Comment 3 Lapo Calamandrei 2016-02-03 14:33:59 UTC
This is a pretty complex issue, to make things nicer wrt font size changes properly we'd need a pair of more features, rem unit (which is the root element font em, which could just translate to default font size em in gtk+) and probably calc() operator. With those feature in place the whole sizing in adwaita need a rethink, so it's not really something for 3.20. I'd really like to tackle this in the next cycle though.
Comment 4 Lukas 2016-02-03 19:50:10 UTC
(In reply to Lapo Calamandrei from comment #3)
> so it's not really something for 3.20. I'd really
> like to tackle this in the next cycle though.

That meas we'd be stuck with the tall widgets for at least Gtk 3.20? What's the issue with leaving things as they were in Gtk 3.18 until it's all sorted out?

If we ship this like it's right now, Gtk 3.20 will be a regression for some users. We really shouldn't make shipping half-baked new implementations that are inferior to the existing ones (like broken typeahead in the file chooser) the norm.
Comment 5 Lapo Calamandrei 2016-02-04 09:13:29 UTC
This is not really an half backed solution, it just does sizing differently. In the past you had entries scale down with font size (with the text inside it getting misaligned), while buttons with icons inside didn't, still giving you weird results. This is a step in the right direction (since it allows you to at least change font w/o breaking the theme).
Comment 6 Christoph Reiter (lazka) 2016-02-04 09:47:37 UTC
In case this hasn't been considered: I'm still using a 1366x768 display, which I guess might not be that common any more and the default font size is (subjectively...) way too large there so I use 10pt.

(both windows are higher than the whole screen btw..)
3.18: https://i.imgur.com/VLH9XHx.png
3.20: https://i.imgur.com/JJFkRkT.png

But I guess I'll get used to it :)
Comment 7 Matthias Clasen 2016-02-05 09:23:22 UTC
rem is supported now
Comment 8 Lukas 2016-02-08 00:55:51 UTC
I can understand that the new way of sizing widgets is desirable in terms of consistency.

But users hate change. The new sizing may be more consistent, but it looks 'wrong' since the widget sizing hasn't changed that much for many years. Some may get annoyed that their favourite application now consumes more screen space without obvious benefit.
Comment 9 Matthias Clasen 2016-02-09 13:36:32 UTC
*** Bug 761693 has been marked as a duplicate of this bug. ***
Comment 12 Matthias Clasen 2016-02-13 04:19:17 UTC
calc is supported too, now
Comment 13 Lapo Calamandrei 2016-02-14 00:12:48 UTC
Ok I'd just need for em/rem to be consistent and quite a bit of time to adapt the theme.
For consistent I mean doing the conversion to px for 1em and stick to that istead of doing em/px conversion every time (yeah we kind of do like the web, but in a ui the behaviour I'm asking for is a lot better).
Now we have, with cantarell 11pt:
1em : 14px (15px on the web)
2em : 29px
3em : 44px

I need, with the same font:
1em : 15px
2em : 30px
3em : 45px
Comment 14 Lapo Calamandrei 2016-02-14 00:13:06 UTC
Ok I'd just need for em/rem to be consistent and quite a bit of time to adapt the theme.
For consistent I mean doing the conversion to px for 1em and stick to that istead of doing em/px conversion every time (yeah we kind of do like the web, but in a ui the behaviour I'm asking for is a lot better).
Now we have, with cantarell 11pt:
1em : 14px (15px on the web)
2em : 29px
3em : 44px

I need, with the same font:
1em : 15px
2em : 30px
3em : 45px
Comment 15 Maxim 2016-02-25 13:36:15 UTC
With the recent changes in the last few days this thing has become even more height.
http://storage8.static.itmages.ru/i/16/0225/h_1456407003_8806847_47fb9d8f1f.png
Comment 17 Christoph Reiter (lazka) 2016-03-25 12:51:03 UTC
Created attachment 324748 [details] [review]
inspector: add slider for adjusting the font scale

Maybe this is helpful for testing the css: https://i.imgur.com/c851MBO.png
Comment 18 Matthias Clasen 2016-03-25 20:13:06 UTC
Comment on attachment 324748 [details] [review]
inspector: add slider for adjusting the font scale

Thanks, pushed with slight visual fixup

Attachment 324748 [details] pushed as 72346cb - inspector: add slider for adjusting the font scale
Comment 19 Matthias Clasen 2016-03-26 15:48:30 UTC
There's an experimental wip/lapo/scalable-awaita branch for those eager to live on the bleeding edge
Comment 20 GNOME Infrastructure Team 2018-05-02 16:55:57 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gtk/issues/597.