Skip to content

Commit 939aab9

Browse files
Using native zoom to compute size for width and height
When autoScale is int200 the size compute for width and height is not scaled correctly during DPI change. Using native zoom instead of corrected zoom fixes the issue.
1 parent 49fd6b0 commit 939aab9

File tree

1 file changed

+2
-2
lines changed
  • bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets

1 file changed

+2
-2
lines changed

bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Control.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -618,8 +618,8 @@ public Point computeSize (int wHint, int hHint) {
618618
public Point computeSize (int wHint, int hHint, boolean changed){
619619
checkWidget ();
620620
int zoom = getZoom();
621-
wHint = (wHint != SWT.DEFAULT ? DPIUtil.scaleUp(wHint, zoom) : wHint);
622-
hHint = (hHint != SWT.DEFAULT ? DPIUtil.scaleUp(hHint, zoom) : hHint);
621+
wHint = (wHint != SWT.DEFAULT ? DPIUtil.scaleUp(wHint, nativeZoom) : wHint);
622+
hHint = (hHint != SWT.DEFAULT ? DPIUtil.scaleUp(hHint, nativeZoom) : hHint);
623623
return DPIUtil.scaleDown(computeSizeInPixels(wHint, hHint, changed), zoom);
624624
}
625625

0 commit comments

Comments
 (0)