diff options
-rw-r--r-- | AppKit/GTMUILocalizerAndLayoutTweaker.m | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/AppKit/GTMUILocalizerAndLayoutTweaker.m b/AppKit/GTMUILocalizerAndLayoutTweaker.m index 5e19cd0..27a4649 100644 --- a/AppKit/GTMUILocalizerAndLayoutTweaker.m +++ b/AppKit/GTMUILocalizerAndLayoutTweaker.m @@ -602,6 +602,12 @@ static NSSize SizeToFit(NSView *view, NSPoint offset) { if (NSWidth(newFrame) < kMinButtonWidth) { newFrame.size.width = kMinButtonWidth; } + } else if ([button bezelStyle] == NSTexturedRoundedBezelStyle && + [[button cell] controlSize] == NSRegularControlSize) { + // The round textured style needs to have a little extra padding, + // otherwise the baseline of the text sinks by a few pixels. + const CGFloat kExtraPaddingAmount = 4.0; + newFrame.size.width += kExtraPaddingAmount; } else { // See note on kWrapperStringSlop for why this is done. NSString *title = [button title]; |