diff options
author | gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3> | 2009-08-07 13:01:05 +0000 |
---|---|---|
committer | gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3> | 2009-08-07 13:01:05 +0000 |
commit | ce2bcee6d23561ec0336469246e068ce30fddb80 (patch) | |
tree | 98a1658690f0b12f6197b8c773f599afe9958572 /AppKit/GTMUILocalizerAndLayoutTweaker.m | |
parent | 1aac50492d94c282511a6484760405b314d1f1f0 (diff) |
[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)
Diffstat (limited to 'AppKit/GTMUILocalizerAndLayoutTweaker.m')
-rw-r--r-- | AppKit/GTMUILocalizerAndLayoutTweaker.m | 5 |
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; |