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 11537f334d6..5f1dd60f7af 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 @@ -667,10 +667,12 @@ private static int getZoomForAutoscaleProperty (int nativeDeviceZoom, String aut public static void runWithAutoScaleValue(String autoScaleValue, Runnable runnable) { String initialAutoScaleValue = DPIUtil.autoScaleValue; DPIUtil.autoScaleValue = autoScaleValue; + DPIUtil.deviceZoom = getZoomForAutoscaleProperty(nativeDeviceZoom); try { runnable.run(); } finally { DPIUtil.autoScaleValue = initialAutoScaleValue; + DPIUtil.deviceZoom = getZoomForAutoscaleProperty(nativeDeviceZoom); } }