diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/internal/CommonWidgetsDPIChangeHandlers.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/custom/CommonWidgetsDPIChangeHandlers.java similarity index 72% rename from bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/internal/CommonWidgetsDPIChangeHandlers.java rename to bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/custom/CommonWidgetsDPIChangeHandlers.java index 1ac53b67756..3dbd5f66fd0 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/internal/CommonWidgetsDPIChangeHandlers.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/custom/CommonWidgetsDPIChangeHandlers.java @@ -11,9 +11,10 @@ * Contributors: * Yatta Solutions - initial API and implementation *******************************************************************************/ -package org.eclipse.swt.internal; +package org.eclipse.swt.custom; import org.eclipse.swt.graphics.*; +import org.eclipse.swt.internal.*; import org.eclipse.swt.widgets.*; /** @@ -31,6 +32,7 @@ public class CommonWidgetsDPIChangeHandlers { public static void registerCommonHandlers() { DPIZoomChangeRegistry.registerHandler(CommonWidgetsDPIChangeHandlers::handleItemDPIChange, Item.class); + DPIZoomChangeRegistry.registerHandler(CommonWidgetsDPIChangeHandlers::handleCComboDPIChange, CCombo.class); } private static void handleItemDPIChange(Widget widget, int newZoom, float scalingFactor) { @@ -43,4 +45,15 @@ private static void handleItemDPIChange(Widget widget, int newZoom, float scalin item.setImage(image); } } + + private static void handleCComboDPIChange(Widget widget, int newZoom, float scalingFactor) { + if (!(widget instanceof CCombo)) { + return; + } + CCombo combo = (CCombo) widget; + + DPIZoomChangeRegistry.applyChange(combo.text, newZoom, scalingFactor); + DPIZoomChangeRegistry.applyChange(combo.list, newZoom, scalingFactor); + DPIZoomChangeRegistry.applyChange(combo.arrow, newZoom, scalingFactor); + } } diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Display.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Display.java index a399914081e..35daca978f7 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Display.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Display.java @@ -21,6 +21,7 @@ import java.util.function.*; import org.eclipse.swt.*; +import org.eclipse.swt.custom.*; import org.eclipse.swt.graphics.*; import org.eclipse.swt.internal.*; import org.eclipse.swt.internal.ole.win32.*;