321898 - always need to add EXTRA_WIDTH for normal PUSH & TOGGLE buttons for some reason.
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Button.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Button.java
index a7074ab..c071839 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Button.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Button.java
@@ -175,17 +175,17 @@
int height = (int)Math.ceil (size.height);
if (wHint != SWT.DEFAULT) width = wHint;
if (hHint != SWT.DEFAULT) height = hHint;
- if ((style & (SWT.PUSH | SWT.TOGGLE)) != 0 && (style & SWT.FLAT) == 0 && image != null) {
+ if ((style & (SWT.PUSH | SWT.TOGGLE)) != 0 && (style & SWT.FLAT) == 0) {
NSCell cell = ((NSControl)view).cell();
- if (cell != null && cell.controlSize() == OS.NSSmallControlSize) {
- height += EXTRA_HEIGHT;
- if (height > 28) {
- cell.setControlSize (OS.NSRegularControlSize);
- } else {
- cell.setControlSize(OS.NSSmallControlSize);
- }
- setFont(getFont());
+ if (cell.controlSize() == OS.NSSmallControlSize && image != null) height += EXTRA_HEIGHT;
+ if (height > 28) {
+ cell.setControlSize (OS.NSRegularControlSize);
+ } else {
+ cell.setControlSize(OS.NSSmallControlSize);
}
+ setFont(getFont());
+
+ // TODO: Why is this necessary?
width += EXTRA_WIDTH;
}
return new Point (width, height);