From 8481886a65e740a0207a1c2c389d8cf59d4c02ab Mon Sep 17 00:00:00 2001 From: fedejeanne Date: Wed, 23 Apr 2025 08:25:47 +0200 Subject: [PATCH] Use auto-scale "nearest" by default in Windows #2910 Defaulting to "smooth" creates blurry images when first displaying the image in a monitor with a high zoom level (e.g. 200%). This is a temporary workaround until https://github.com/eclipse-platform/eclipse.platform.ui/issues/2910 is properly fixed. --- .../Eclipse SWT/common/org/eclipse/swt/internal/DPIUtil.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/DPIUtil.java b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/DPIUtil.java index 5f1dd60f7af..b2825dc1a81 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/DPIUtil.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/internal/DPIUtil.java @@ -626,7 +626,10 @@ public static void setDeviceZoom (int nativeDeviceZoom) { private static boolean sholdUseSmoothScaling() { return switch (SWT.getPlatform()) { case "gtk" -> deviceZoom / 100 * 100 != deviceZoom; - case "win32" -> isMonitorSpecificScalingActive(); + // FIXME the "win32" case should be uncommented as soon as the issue + // https://github.com/eclipse-platform/eclipse.platform.ui/issues/2910 + // is properly fixed + // case "win32" -> isMonitorSpecificScalingActive(); default -> false; }; }