diff options
author | Silenio Quarti <silenio> | 2002-12-06 01:41:36 +0000 |
---|---|---|
committer | Silenio Quarti <silenio> | 2002-12-06 01:41:36 +0000 |
commit | f70798c3cce8017754d9d693b34a2d339a009809 (patch) | |
tree | 1deec021db61f7e8a79b15bf2f0d50a80965254f | |
parent | 3d28a1173132af3b3240878eef7d2d280f89e91e (diff) | |
download | eclipse.platform.swt-f70798c3cce8017754d9d693b34a2d339a009809.tar.gz eclipse.platform.swt-f70798c3cce8017754d9d693b34a2d339a009809.tar.xz eclipse.platform.swt-f70798c3cce8017754d9d693b34a2d339a009809.zip |
*** empty log message ***
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Button.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Button.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Button.java index 51650600c8..324da1b32b 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Button.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Button.java @@ -110,7 +110,7 @@ public Point computeSize (int wHint, int hHint, boolean changed) { height += 10; } else { width += 28; - height += 6; + height += 8; } } @@ -126,8 +126,9 @@ public Point computeSize (int wHint, int hHint, boolean changed) { * very small, even 0. */ width = Math.max(20, width); - if (wHint != SWT.DEFAULT) width = wHint; - if (hHint != SWT.DEFAULT) height = hHint; + int border = (style & SWT.PUSH) != 0 ? 2 : 0; + if (wHint != SWT.DEFAULT) width = wHint + (border * 2); + if (hHint != SWT.DEFAULT) height = hHint + (border * 2); return new Point (width, height); } |