RFR: 8248126: JavaFX ignores HiDPI scaling settings on some linux platforms
Kevin Rushforth
kcr at openjdk.java.net
Tue Feb 9 15:11:40 UTC 2021
On Sun, 7 Feb 2021 11:33:13 GMT, Pankaj Bansal <pbansal at openjdk.org> wrote:
> JavaFX ignores the HiDPI scaling settings on Fedora 32 and Ubuntu 20.04.
>
> The scale detection in JavaFX assumes that the "scaling-factor" setting in "org.gnome.desktop.interface" has the correct Hi-DPI setting. But this not true for some systems and "scaling-factor" has value of 0. JavaFX should detect the windows level scale factor automatically in this case, but this logic is missing right now. So, the JavaFX applications are not scaled properly.
> This issue can be reproduced by setting the scale from Settings->Displays->Set Scale. Note, the option for scale may not be present from some resolution settings, so you may need to change it to see the option to scale the full windowing system. The issue can be verified by running some JavaFX applications/samples. The application will not be scaled properly according to the UIScale. https://bugs.openjdk.java.net/browse/JDK-8258464 is similar bug and has been closed as duplicate.
>
> This fix adds the logic to detect the scale from windows system itself.
> I have ran all automated unit tests and system tests, this fix is not causing any new failures. I have tested this on fedora 32 VM, Ubuntu 20.04 VM and Ubuntu 20.10 VM.
This is a simple enough fix, but it would be helpful to have a second reviewer take a look, and test it.
-------------
PR: https://git.openjdk.java.net/jfx/pull/396
More information about the openjfx-dev
mailing list