openjdk-jfx
openjdk-jfx copied to clipboard
JavaFX Embedded in SWT Broken on Linux with HighDPI Display Settings
I already posted this possible bug to the Eclipse bug database: https://bugs.eclipse.org/bugs/show_bug.cgi?id=546011
The bug occurs if you embedd JavaFX in SWT and only on Linux with a HighDPI display (or scale factor 2 on GNOME and maybe KDE).
Somehow the JavaFX scale settings interfere with SWT. The behaviour can be reproduced with the following simple SWT/JavaFX example (scale factor on Ubuntu Gnome = 2):
https://docs.oracle.com/javase/8/javafx/interoperability-tutorial/fx-swt_interoperability.htm
If you execute this simple example the buttons are not scaled at all. If you press on the JavaFX button only the SWT button gets resized.
Already in this very simple example the SWT JavaFX interop. seems to be disturbed. The example was ,e.g., tested with Ubuntu Linux 19.04 installed.
In the Eclipse bug database a screenshot is available, too which shows the result with an RCP application embedding JavaFX in SWT.
The bug occurs with OpenJFX 11,12.
This behaviour can't be reproduced with Java 1.8.x (with no scaling support).