Skip to content

Commit 1c9ab79

Browse files
committed
[Win32] Enable monitor-specific scaling by default
By now, SWT had monitor-specific scaling on Windows disabled by default and used the existing, single-zoom HiDPI support. There are good reasons to now change the default of SWT to have monitor-specific scaling enabled: - Eclipse applications default to have monitor-specific scaling enabled for several months now, so SWT and Eclipse default behaviors are different - With default JVM settings, pure SWT application have no proper scaling as the existing HiDPI support requires DPI awareness "System" to function properly whereas the JVM default is "PerMonitorV2" and requires the application to scale on its own. So by default, SWT applications currently have no scaling at all - The feature has matured throughout the last year with it being the default for Eclipse application for several months now. This change adapts the SWT default to enable monitor-specific scaling on Windows.
1 parent 4b7c450 commit 1c9ab79

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ public static boolean isMonitorSpecificScalingActive() {
158158
return false;
159159
}
160160
String updateOnRuntimeValue = System.getProperty(SWT_AUTOSCALE_UPDATE_ON_RUNTIME);
161-
return "force".equalsIgnoreCase(updateOnRuntimeValue) || "true".equalsIgnoreCase(updateOnRuntimeValue);
161+
return !"false".equalsIgnoreCase(updateOnRuntimeValue);
162162
}
163163

164164
public static int pixelToPoint(int size, int zoom) {

0 commit comments

Comments
 (0)