GateNLP / gate-core

The GATE Embedded core API and GATE Developer application
GNU Lesser General Public License v3.0
75 stars 29 forks source link

Proper GUI scaling on HiDPI displays. #137

Open johann-petrak opened 3 years ago

johann-petrak commented 3 years ago

Tested on a laptop with Ubuntu 20.04.1, 2880x1620 resolution set to 200% scaling in the default window manager. Tested with both the "fractional scaling" option enabled and disabled.

Tested to run a freshly installed revision 9532ab9902b2a4f7f7fcb8a7e22459fbc346b29d and also on a freshly compiles (with Java 8) revision 81d16d54b272254db006f401ea5363b89b4e2fd3

Tested with Java versions:

All three showed the splash screen and GUI without scaling.

Workarounds that worked for me in these cases:

Same with the Mate window manager

johann-petrak commented 3 years ago

Note to self: the following settings are mentioned on the internets for adjusting scaling or dealing with HiDPI problems:

dianamaynard commented 3 years ago

MacBook Pro (16-inch, 2019) 1280x720 resolution

GATE 9.0-SNAPSHOT build 81d16d5 started at Sat Jan 23 17:17:33 GMT 2021 and using Java 1.8.0_181 Oracle Corporation on Mac OS X x86_64 10.15.7.

Everything looks normal

greenwoodma commented 3 years ago

Dell XPS-13 with Ubuntu 16.04

3200x1800 display with the scale for menu and titlebars set to 2

Under Java 8 this results in a tiny little version of GATE that's half the size it should be. Under Java 9 and above (at least up to and including 13) it works as expected with properly scaled fonts etc.

johann-petrak commented 3 years ago

@greenwoodma do the workarounds also work for you when the GATE is tiny under Java 8?

greenwoodma commented 3 years ago

No. If I use either on their own and Java 8 then it's still tiny, even using both at the same time makes no difference.

johann-petrak commented 3 years ago

OK so it seems behaviour depends on both the Java and Ubuntu versions.

greenwoodma commented 3 years ago

Yes, it looks like you have different display options (i.e. fractional scaling) which I don't in 16.04 so my guess is this affects the numbers that Java retrieves from the OS and hence how it then scales things; one of the numbers used deep in the scaling comes from the AWT Toolkit under the property name "gnome.Xft/DPI"