Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
amartya4256 committed Jul 26, 2024
1 parent ba97568 commit 6e35962
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down

0 comments on commit 6e35962

Please sign in to comment.