Fixed Aristo affecting unbordered pop up buttons.

Reviewed by me.
This commit is contained in:
Francisco Tolmasky committed 2009-03-22 12:40:06 -07:00
1 parent 0638de200b
commit e5ea6b242d
2 files changed
+9 -9

No files matched your search

+5 -5
View File
@@ -472,9 +472,9 @@ var _CPButtonClassName = nil,
{
var contentInset = [self currentValueForThemedAttributeName:@"content-inset"];
if (!contentInset)
if (_CGInsetIsEmpty(contentInset))
return bounds;
bounds.origin.x += contentInset.left;
bounds.origin.y += contentInset.top;
bounds.size.width -= contentInset.left + contentInset.right;
@@ -489,8 +489,8 @@ var _CPButtonClassName = nil,
return _CGRectMakeZero();
var bezelInset = [self currentValueForThemedAttributeName:@"bezel-inset"];
if (!_CGInsetIsEmpty(bezelInset))
if (_CGInsetIsEmpty(bezelInset))
return bounds;
bounds.origin.x += bezelInset.left;
@@ -540,7 +540,7 @@ var _CPButtonClassName = nil,
var contentView = [self layoutEphemeralSubviewNamed:@"content-view"
positioned:CPWindowAbove
relativeToEphemeralSubviewNamed:@"bezel-view"];
if (contentView)
{
[contentView setText:((_controlState & CPControlStateHighlighted) && _alternateTitle) ? _alternateTitle : _title];
+4 -4
View File
@@ -212,8 +212,8 @@
[button setTitle:@"Pop Up"];
[button setValue:color forThemedAttributeName:@"bezel-color"];
[button setValue:CGInsetMake(0, 5, 0, 27.0 + 5.0) forThemedAttributeName:@"content-inset"];
[button setValue:color forThemedAttributeName:@"bezel-color" inControlState:CPControlStateBordered];
[button setValue:CGInsetMake(0, 5, 0, 27.0 + 5.0) forThemedAttributeName:@"content-inset" inControlState:CPControlStateBordered];
[button setValue:[CPFont boldSystemFontOfSize:12.0] forThemedAttributeName:@"font"];
[button setValue:[CPColor colorWithCalibratedWhite:79.0 / 255.0 alpha:1.0] forThemedAttributeName:@"text-color"];
[button setValue:[CPColor colorWithCalibratedWhite:240.0 / 255.0 alpha:1.0] forThemedAttributeName:@"text-shadow-color"];
@@ -237,8 +237,8 @@
[button setTitle:@"Pop Up"];
[button setValue:color forThemedAttributeName:@"bezel-color" inControlState:CPPopUpButtonStatePullsDown];
[button setValue:CGInsetMake(0, 5, 0, 27.0 + 5.0) forThemedAttributeName:@"content-inset"];
[button setValue:color forThemedAttributeName:@"bezel-color" inControlState:CPPopUpButtonStatePullsDown|CPControlStateBordered];
[button setValue:CGInsetMake(0, 5, 0, 27.0 + 5.0) forThemedAttributeName:@"content-inset" inControlState:CPControlStateBordered];
[button setValue:[CPFont boldSystemFontOfSize:12.0] forThemedAttributeName:@"font"];
[button setValue:[CPColor colorWithCalibratedWhite:79.0 / 255.0 alpha:1.0] forThemedAttributeName:@"text-color"];
[button setValue:[CPColor colorWithCalibratedWhite:240.0 / 255.0 alpha:1.0] forThemedAttributeName:@"text-shadow-color"];