Skip to content

Commit a0aebf9

Browse files
committed
Use smooth scaling on Windows if monitor-specific UI scaling is active
Do not change the logic for Linux: coming back to 100% monitor stays in the current mode.
1 parent 54dad6c commit a0aebf9

File tree

1 file changed

+3
-1
lines changed
  • bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal

1 file changed

+3
-1
lines changed

bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/DPIUtil.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -603,7 +603,9 @@ public static void setDeviceZoom (int nativeDeviceZoom) {
603603

604604
DPIUtil.deviceZoom = deviceZoom;
605605
System.setProperty("org.eclipse.swt.internal.deviceZoom", Integer.toString(deviceZoom));
606-
if (deviceZoom != 100 && autoScaleMethodSetting == AutoScaleMethod.AUTO) {
606+
boolean isGtk = SWT.getPlatform().equals("gtk");
607+
if (!(isGtk && deviceZoom == 100) // in GTK, preserve the current mode when switching to a 100% monitor
608+
&& autoScaleMethodSetting == AutoScaleMethod.AUTO) {
607609
if (sholdUseSmoothScaling()) {
608610
autoScaleMethod = AutoScaleMethod.SMOOTH;
609611
} else {

0 commit comments

Comments
 (0)