diff options
-rw-r--r-- | AppKit/GTMUILocalizerAndLayoutTweaker.m | 5 | ||||
-rw-r--r-- | AppKit/TestData/GTMUILocalizerAndLayoutTweakerTest1-0.tiff | bin | 29352 -> 29342 bytes | |||
-rw-r--r-- | AppKit/TestData/GTMUILocalizerAndLayoutTweakerTest1-1.tiff | bin | 25054 -> 25084 bytes | |||
-rw-r--r-- | AppKit/TestData/GTMUILocalizerAndLayoutTweakerTest1-2.tiff | bin | 25596 -> 25580 bytes | |||
-rw-r--r-- | AppKit/TestData/GTMUILocalizerAndLayoutTweakerTest2-1.tiff | bin | 11914 -> 11906 bytes | |||
-rw-r--r-- | AppKit/TestData/GTMUILocalizerAndLayoutTweakerTest2-2.tiff | bin | 11898 -> 11876 bytes |
6 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; diff --git a/AppKit/TestData/GTMUILocalizerAndLayoutTweakerTest1-0.tiff b/AppKit/TestData/GTMUILocalizerAndLayoutTweakerTest1-0.tiff Binary files differindex 4d0e231..a0108e2 100644 --- a/AppKit/TestData/GTMUILocalizerAndLayoutTweakerTest1-0.tiff +++ b/AppKit/TestData/GTMUILocalizerAndLayoutTweakerTest1-0.tiff diff --git a/AppKit/TestData/GTMUILocalizerAndLayoutTweakerTest1-1.tiff b/AppKit/TestData/GTMUILocalizerAndLayoutTweakerTest1-1.tiff Binary files differindex faace9d..a9e1604 100644 --- a/AppKit/TestData/GTMUILocalizerAndLayoutTweakerTest1-1.tiff +++ b/AppKit/TestData/GTMUILocalizerAndLayoutTweakerTest1-1.tiff diff --git a/AppKit/TestData/GTMUILocalizerAndLayoutTweakerTest1-2.tiff b/AppKit/TestData/GTMUILocalizerAndLayoutTweakerTest1-2.tiff Binary files differindex 99214f4..9e9adf7 100644 --- a/AppKit/TestData/GTMUILocalizerAndLayoutTweakerTest1-2.tiff +++ b/AppKit/TestData/GTMUILocalizerAndLayoutTweakerTest1-2.tiff diff --git a/AppKit/TestData/GTMUILocalizerAndLayoutTweakerTest2-1.tiff b/AppKit/TestData/GTMUILocalizerAndLayoutTweakerTest2-1.tiff Binary files differindex 6d30743..26409a1 100644 --- a/AppKit/TestData/GTMUILocalizerAndLayoutTweakerTest2-1.tiff +++ b/AppKit/TestData/GTMUILocalizerAndLayoutTweakerTest2-1.tiff diff --git a/AppKit/TestData/GTMUILocalizerAndLayoutTweakerTest2-2.tiff b/AppKit/TestData/GTMUILocalizerAndLayoutTweakerTest2-2.tiff Binary files differindex 906fd9c..082e312 100644 --- a/AppKit/TestData/GTMUILocalizerAndLayoutTweakerTest2-2.tiff +++ b/AppKit/TestData/GTMUILocalizerAndLayoutTweakerTest2-2.tiff |