From e09fd1ace6527482d3840ecf064945efec27579d Mon Sep 17 00:00:00 2001 From: Kuba3105 Date: Wed, 3 Jul 2024 13:19:05 +0200 Subject: [PATCH] Scale up magic number in Button Use DPIUtil --- .../Eclipse SWT/win32/org/eclipse/swt/widgets/Button.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 821c66a078d..74ea5af043e 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 @@ -365,7 +365,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;