From ce2bcee6d23561ec0336469246e068ce30fddb80 Mon Sep 17 00:00:00 2001 From: "gtm.daemon" Date: Fri, 7 Aug 2009 13:01:05 +0000 Subject: [Author: thomasvl] Bump up the min size on buttons with a note about the logic, update the unittest images accordingly. R=stuartmorgan DELTA=9 (3 added, 0 deleted, 6 changed) --- AppKit/GTMUILocalizerAndLayoutTweaker.m | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'AppKit/GTMUILocalizerAndLayoutTweaker.m') 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; -- cgit v1.2.3