Text size and theming enhancements

- _CPImageAndTextView adds extra pixels to allow for fractional pixels in -sizeToFit.

- NSButton now allows buttons that are not fixed height, if the theme allows it.

- Documented the mapping between bezel style constants and their IB style names.
This commit is contained in:
Aparajita Fishman
2012-07-13 21:00:02 -07:00
parent 590b7ec704
commit 32dc0826cb
4 changed files with 77 additions and 32 deletions
+7 -1
View File
@@ -744,7 +744,13 @@ var _CPimageAndTextViewFrameSizeChangedFlag = 1 << 0,
if ((_imagePosition !== CPImageOnly) && [_text length] > 0)
{
if (!_textSize)
_textSize = [_text sizeWithFont:_font || [CPFont systemFontOfSize:CPFontCurrentSystemSize]];
{
_textSize = [_text sizeWithFont:_font || [CPFont systemFontOfSize:0]];
// Account for fractional pixels
_textSize.width += 1;
_textSize.height += 1;
}
if (!_image || _imagePosition === CPImageOverlaps)
{