Skip to content

Commit 4621729

Browse files
amartya4256fedejeanne
authored andcommitted
Device getDPI scaling fix
This commit enforces device zoom to be used for scaling down the DPI values instead of the native zoom. contributes to #62 and #127
1 parent a5e1922 commit 4621729

File tree

1 file changed

+1
-1
lines changed
  • bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics

1 file changed

+1
-1
lines changed

bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Device.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,7 @@ public Point getDPI () {
519519
int dpiX = OS.GetDeviceCaps (hDC, OS.LOGPIXELSX);
520520
int dpiY = OS.GetDeviceCaps (hDC, OS.LOGPIXELSY);
521521
internal_dispose_GC (hDC, null);
522-
return DPIUtil.scaleDown(new Point (dpiX, dpiY), getDeviceZoom());
522+
return DPIUtil.scaleDown(new Point (dpiX, dpiY), DPIUtil.getZoomForAutoscaleProperty(getDeviceZoom()));
523523
}
524524

525525
/**

0 commit comments

Comments
 (0)