From fe17a1a1f959784dd29b34a366cf52173c451186 Mon Sep 17 00:00:00 2001 From: Andreas Koch Date: Thu, 7 Nov 2024 13:34:13 +0100 Subject: [PATCH] [win32] Fix for refreshing the background image This commit adapts the refreshing of a background image of a control on a DPI change. This must only be done, if the image was set directly on the control. Contributes to #62 --- .../Eclipse SWT/win32/org/eclipse/swt/widgets/Control.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Control.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Control.java index 7478dabfb2..17a3a11977 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Control.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Control.java @@ -5810,7 +5810,7 @@ private static void handleDPIChange(Widget widget, int newZoom, float scalingFac } resizeFont(control, control.getShell().nativeZoom); - Image image = control.getBackgroundImage(); + Image image = control.backgroundImage; if (image != null) { if (image.isDisposed()) { control.setBackgroundImage(null);