ADDITIONAL SYSTEM INFORMATION :
RHEL 7.3
OpenJDK11 + OpenJFX11
A DESCRIPTION OF THE PROBLEM :
SWT applications support HiDPI scaling on GTK3, so if I run an SWT app with GDK_SCALE=2, it starts properly scaled. However instantiating an FXCanvas resets the scaling, the UI is repainted with 1:1 scaling.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Set GDK_SCALE=2,
Run the below snippet (with JFX 11 and SWT 4.10 on the classpath) and click the button "Init FX"
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
SWT app starts scaled x2 and does not change after clicking the button.
ACTUAL -
SWT app starts scaled x2, but shrinks to the original scale after clicking the button.
---------- BEGIN SOURCE ----------
public class Main {
public static void main(String[] args) {
final Display display = new Display();
final Shell shell = new Shell(display, SWT.BORDER);
final RowLayout layout = new RowLayout();
shell.setLayout(layout);
final org.eclipse.swt.widgets.Button swtButton = new org.eclipse.swt.widgets.Button(shell, SWT.PUSH);
swtButton.setText("Init FX");
swtButton.addListener(SWT.Selection, event -> {
new FXCanvas(new Shell(), SWT.NONE);
});
shell.open();
shell.pack();
while (!shell.isDisposed()) {
if (!display.readAndDispatch()) {
display.sleep();
}
}
display.dispose();
}
}
---------- END SOURCE ----------
FREQUENCY : always
RHEL 7.3
OpenJDK11 + OpenJFX11
A DESCRIPTION OF THE PROBLEM :
SWT applications support HiDPI scaling on GTK3, so if I run an SWT app with GDK_SCALE=2, it starts properly scaled. However instantiating an FXCanvas resets the scaling, the UI is repainted with 1:1 scaling.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Set GDK_SCALE=2,
Run the below snippet (with JFX 11 and SWT 4.10 on the classpath) and click the button "Init FX"
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
SWT app starts scaled x2 and does not change after clicking the button.
ACTUAL -
SWT app starts scaled x2, but shrinks to the original scale after clicking the button.
---------- BEGIN SOURCE ----------
public class Main {
public static void main(String[] args) {
final Display display = new Display();
final Shell shell = new Shell(display, SWT.BORDER);
final RowLayout layout = new RowLayout();
shell.setLayout(layout);
final org.eclipse.swt.widgets.Button swtButton = new org.eclipse.swt.widgets.Button(shell, SWT.PUSH);
swtButton.setText("Init FX");
swtButton.addListener(SWT.Selection, event -> {
new FXCanvas(new Shell(), SWT.NONE);
});
shell.open();
shell.pack();
while (!shell.isDisposed()) {
if (!display.readAndDispatch()) {
display.sleep();
}
}
display.dispose();
}
}
---------- END SOURCE ----------
FREQUENCY : always