Bug 490321 - [HiDPI][GTK3] Layouts don't work after dynamic resolution switching; widgets keep original size
Summary: [HiDPI][GTK3] Layouts don't work after dynamic resolution switching; widgets ...
Status: CLOSED WORKSFORME
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.6   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: triaged
: 467061 (view as bug list)
Depends on:
Blocks: 538342 534820
  Show dependency tree
 
Reported: 2016-03-23 13:24 EDT by Markus Keller CLA
Modified: 2019-02-20 13:56 EST (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Keller CLA 2016-03-23 13:24:02 EDT
Ubuntu 14.04, GTK3

When I start Snippet172 at scale factor 1 and then switch the scale factor to 1.5, then only the Buttons with a FILL GridData attribute get resized, but other widgets keep the originally computed size. All buttons get a bigger font.

When I make the shell wider, the height of the bottom row of buttons (those with a horizontal FILL) is corrected, but the other buttons stay too small.


I reduced Snippet172 to only create the "LEFT, FILL" button.

In Button#computeSizeInPixels(int, int, boolean), I saw that 
Control#computeNativeSize(long, int, int, boolean) calls gtk_widget_get_preferred_size (), which returns 80, 29 at 100%, and it returns the same after the scale factor was set to 150%.

When I start with scale factor 150%, the computed size is 110, 38.

=> Looks like GTK needs a magic spell to recompute the preferred size of widgets after a dynamic resolution change.
Comment 1 Eclipse Genie CLA 2016-04-12 03:56:34 EDT
New Gerrit change created: https://git.eclipse.org/r/70444
Comment 2 Niraj Modi CLA 2017-05-22 07:07:47 EDT
*** Bug 467061 has been marked as a duplicate of this bug. ***
Comment 3 Eric Williams CLA 2019-02-20 13:56:35 EST
I don't see this any longer now that we use native scaling. Non-native widgets like CTabFolder and such still have this problem but this is being tracked by bug 539821.