Skip to content

Commit df0ae71

Browse files
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. Co-authored-by: Heiko Klare <[email protected]>
1 parent 6b20ce2 commit df0ae71

File tree

1 file changed

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

1 file changed

+4
-1
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -603,7 +603,10 @@ 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+
607+
// in GTK, preserve the current method when switching to a 100% monitor
608+
boolean preserveScalingMethod = SWT.getPlatform().equals("gtk") && deviceZoom == 100;
609+
if (!preserveScalingMethod && autoScaleMethodSetting == AutoScaleMethod.AUTO) {
607610
if (sholdUseSmoothScaling()) {
608611
autoScaleMethod = AutoScaleMethod.SMOOTH;
609612
} else {

0 commit comments

Comments
 (0)