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 | |
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)
-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 |