diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Button.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Button.java index 30134a9c282..5611203f94c 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Button.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Button.java @@ -361,10 +361,10 @@ else if ((style & SWT.RIGHT) != 0) { Rectangle rect = DPIUtil.scaleBounds(image.getBounds(), this.getZoom(), 100); width = rect.width; if (hasText && text.length () != 0) { - width += MARGIN * 2; + width += DPIUtil.autoScaleUp(MARGIN * 2, getZoom());; } height = rect.height; - extra = MARGIN * 2; + extra = DPIUtil.autoScaleUp(MARGIN * 2, getZoom());; } } if (hasText) { @@ -378,7 +378,7 @@ else if ((style & SWT.RIGHT) != 0) { if (length == 0) { height = Math.max (height, lptm.tmHeight); } else { - extra = Math.max (MARGIN * 2, lptm.tmAveCharWidth); + extra = Math.max (DPIUtil.autoScaleUp(MARGIN * 2, getZoom()), lptm.tmAveCharWidth); char [] buffer = text.toCharArray (); RECT rect = new RECT (); int flags = OS.DT_CALCRECT | OS.DT_SINGLELINE;