aboutsummaryrefslogtreecommitdiff
path: root/AppKit/GTMUILocalizerAndLayoutTweaker.m
diff options
context:
space:
mode:
Diffstat (limited to 'AppKit/GTMUILocalizerAndLayoutTweaker.m')
-rw-r--r--AppKit/GTMUILocalizerAndLayoutTweaker.m5
1 files changed, 4 insertions, 1 deletions
diff --git a/AppKit/GTMUILocalizerAndLayoutTweaker.m b/AppKit/GTMUILocalizerAndLayoutTweaker.m
index 5ee8298..4f94835 100644
--- a/AppKit/GTMUILocalizerAndLayoutTweaker.m
+++ b/AppKit/GTMUILocalizerAndLayoutTweaker.m
@@ -261,7 +261,10 @@ static NSSize SizeToFit(NSView *view, NSPoint offset) {
// TODO: We need to check the type of button before doing this.
if ([view isKindOfClass:[NSButton class]]) {
const float kExtraPaddingAmount = 12;
- const float kMinButtonWidth = 70; // The default button size in IB.
+ // Width is tricky, new buttons in IB are 96 wide, Carbon seems to have
+ // defaulted to 70, Cocoa seems to like 82. But we go with 96 since
+ // that's what IB is doing these days.
+ const float kMinButtonWidth = 96;
newFrame.size.width = NSWidth(newFrame) + kExtraPaddingAmount;
if (NSWidth(newFrame) < kMinButtonWidth) {
newFrame.size.width = kMinButtonWidth;