Skip to content

Commit

Permalink
Fixed a bug where the CPAlert was being displayed with black text on …
Browse files Browse the repository at this point in the history
…a black background if the styleMask was set to 'CPHUDBackgroundWindowMask' and something else. cappuccino#220
  • Loading branch information
Jake MacMullin authored and Ross Boucher committed Oct 9, 2009
1 parent bc6f168 commit e125139
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions AppKit/CPAlert.j
Expand Up @@ -149,15 +149,15 @@ var CPAlertWarningImage,
[_alertPanel setFloatingPanel:YES];
[_alertPanel center];

[_messageLabel setTextColor:(styleMask == CPHUDBackgroundWindowMask) ? [CPColor whiteColor] : [CPColor blackColor]];
[_messageLabel setTextColor:(styleMask & CPHUDBackgroundWindowMask) ? [CPColor whiteColor] : [CPColor blackColor]];

var count = [_buttons count];
for(var i=0; i < count; i++)
{
var button = _buttons[i];

[button setFrameSize:CGSizeMake([button frame].size.width, (styleMask == CPHUDBackgroundWindowMask) ? 20.0 : 24.0)];
[button setBezelStyle:(styleMask == CPHUDBackgroundWindowMask) ? CPHUDBezelStyle : CPRoundedBezelStyle];
[button setBezelStyle:(styleMask & CPHUDBackgroundWindowMask) ? CPHUDBezelStyle : CPRoundedBezelStyle];

[[_alertPanel contentView] addSubview:button];
}
Expand Down

0 comments on commit e125139

Please sign in to comment.