From e12513977712ebcdcb911a115586d0fca9ec6dae Mon Sep 17 00:00:00 2001 From: Jake MacMullin Date: Wed, 16 Sep 2009 15:56:43 +1000 Subject: [PATCH] Fixed a bug where the CPAlert was being displayed with black text on a black background if the styleMask was set to 'CPHUDBackgroundWindowMask' and something else. #220 --- AppKit/CPAlert.j | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/AppKit/CPAlert.j b/AppKit/CPAlert.j index 6e41f149b..75b63ce9d 100644 --- a/AppKit/CPAlert.j +++ b/AppKit/CPAlert.j @@ -149,7 +149,7 @@ 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++) @@ -157,7 +157,7 @@ var CPAlertWarningImage, 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]; }