diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TableDragSourceEffect.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TableDragSourceEffect.java index 8eac76a3423..44012702f64 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TableDragSourceEffect.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TableDragSourceEffect.java @@ -147,7 +147,7 @@ Image getDragSourceImage(DragSourceEvent event) { data.transparentPixel = shdi.crColorKey << 8; } Display display = control.getDisplay(); - dragSourceImage = new Image(display, new AutoScaleImageDataProvider(display, data, DPIUtil.getDeviceZoom())); + dragSourceImage = new Image(display, new AutoScaleImageDataProvider(display, data, DPIUtil.getZoomForAutoscaleProperty(control.nativeZoom))); OS.SelectObject (memHdc, oldMemBitmap); OS.DeleteDC (memHdc); OS.DeleteObject (memDib); diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TreeDragSourceEffect.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TreeDragSourceEffect.java index 363bf9c581b..3e084e64549 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TreeDragSourceEffect.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/win32/org/eclipse/swt/dnd/TreeDragSourceEffect.java @@ -146,7 +146,7 @@ Image getDragSourceImage(DragSourceEvent event) { data.transparentPixel = shdi.crColorKey << 8; } Display display = control.getDisplay (); - dragSourceImage = new Image (display, new AutoScaleImageDataProvider(display, data, DPIUtil.getDeviceZoom())); + dragSourceImage = new Image (display, new AutoScaleImageDataProvider(display, data, DPIUtil.getZoomForAutoscaleProperty(control.nativeZoom))); OS.SelectObject (memHdc, oldMemBitmap); OS.DeleteDC (memHdc); OS.DeleteObject (memDib); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Image.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Image.java index 835497b8e1c..afed0488e7e 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Image.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Image.java @@ -2229,7 +2229,7 @@ public long internal_new_GC (GCData data) { data.device = device; data.nativeZoom = initialNativeZoom; data.image = this; - data.font = SWTFontProvider.getSystemFont(device, DPIUtil.getNativeDeviceZoom()); + data.font = SWTFontProvider.getSystemFont(device, initialNativeZoom); } return imageDC; } diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TaskBar.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TaskBar.java index e0bc571bad3..26bc8dae95d 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TaskBar.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TaskBar.java @@ -166,14 +166,14 @@ IShellLink createShellLink (MenuItem item) { ImageData data; if (item.hBitmap != 0) { Image image2 = Image.win32_new (display, SWT.BITMAP, item.hBitmap); - data = image2.getImageData (DPIUtil.getDeviceZoom ()); + data = image2.getImageData (getZoom()); /* * image2 instance doesn't own the handle and shall not be disposed. Make it * appear disposed to cause leak trackers to ignore it. */ image2.handle = 0; } else { - data = image.getImageData (DPIUtil.getDeviceZoom ()); + data = image.getImageData (getZoom()); } ImageLoader loader = new ImageLoader (); loader.data = new ImageData [] {data};