GNOME Bugzilla – Bug 744354
server-side decorations render incorrectly in hi-dpi
Last modified: 2015-03-19 01:00:09 UTC
Created attachment 296638 [details] picture of incorrect DPI used for server-side decoration on gnome-terminal Today I updated to latest rawhide on a Pixel and noticed that the server-side decorations on gnome-terminal and firefox was rendering at 96DPI. Attached image shows a comparison of nautilus (render correctly) and gnome-terminal (very small x icon).
(was told this was might be a problem in mutter.)
(In reply to Bastian from comment #1) > (was told this was might be a problem in mutter.) It is. I have a work-in-progress patch lying around locally, maybe you could test it tomorrow? (I can do a rawhide build, so you don't have to build anything yourself)
(In reply to Florian Müllner from comment #2) > It is. I have a work-in-progress patch lying around locally, maybe you could > test it tomorrow? > (I can do a rawhide build, so you don't have to build anything yourself) Sounds good, but I would need to ask you the favor of telling me how to install the rawhide build tomorrow.
*** Bug 744925 has been marked as a duplicate of this bug. ***
Created attachment 299415 [details] [review] theme: Scale window decorations on HiDPI displays As we opt out of GTK+/Clutter's HiDPI handling, we need to apply the window scaling factor manually to decorations, both the geometry and when drawing.
Created attachment 299416 [details] screenshot with patch Florian, I just tested this patch but while it seems to work well for the geometry of the frames, it does not scale the title correctly. See attached screenshot.
Maybe it is because gnome-shell/mutter still honor the font scaling?
(In reply to Cosimo Cecchi from comment #6) > Florian, I just tested this patch but while it seems to work well for the > geometry of the frames, it does not scale the title correctly. Yeah, unfortunately I can only test with forced/artificial window-scaling, not on actual HiDPI hardware. Does diff --git a/src/ui/theme.c b/src/ui/theme.c index f36554e..f73b428 100644 --- a/src/ui/theme.c +++ b/src/ui/theme.c @@ -140,8 +140,8 @@ meta_frame_layout_apply_scale (const MetaFrameLayout *layout, PangoFontDescription *font_desc) { int size = pango_font_description_get_size (font_desc); - pango_font_description_set_size (font_desc, - MAX (size * layout->title_scale, 1)); + double scale = layout->title_scale / meta_theme_get_window_scaling_factor (); + pango_font_description_set_size (font_desc, MAX (size * scale, 1)); } static MetaButtonSpace* work?
Yes, that works perfectly! \o/
Created attachment 299429 [details] [review] theme: Scale window decorations on HiDPI displays Squashed bits from comment #8.
(In reply to Cosimo Cecchi from comment #9) > Yes, that works perfectly! \o/ Just to make sure, could you test whether the 'titlebar-uses-system-font' option in org.gnome.desktop.wm.preferences makes a difference?
Doesn't seem to make a difference; but one thing I noticed with your patch is that shadow sizes don't seem scaled up.
Right, it doesn't touch shadows at all - but then neither did the new decorations, so this shouldn't be different from 3.14 ...
They're not different from 3.14. I think it's just slightly more noticeable now that they're the only thing that does not match :-) Still, I'd take this patch any day, as it's a big improvement.
Attachment 299429 [details] pushed as 57c1078 - theme: Scale window decorations on HiDPI displays
*** Bug 705411 has been marked as a duplicate of this bug. ***