mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-11-19 21:19:24 +00:00
Fix for disabled menu items still highlighting
Signed-off-by: 280north <admin+280north@280north.com>
This commit is contained in:
1 parent
67658876d5
commit
78503a9380
1 file changed
+17
-14
+17
-14
@@ -1066,23 +1066,26 @@ var _CPMenuItemSelectionColor = nil,
|
||||
|
||||
else
|
||||
{
|
||||
[_imageAndTitleView setTextColor:shouldHighlight ? [CPColor whiteColor] : [self textColor]];
|
||||
|
||||
if (shouldHighlight)
|
||||
[self setBackgroundColor:_CPMenuItemSelectionColor];
|
||||
else
|
||||
[self setBackgroundColor:nil];
|
||||
|
||||
var state = [_menuItem state];
|
||||
|
||||
switch (state)
|
||||
if([_menuItem isEnabled])
|
||||
{
|
||||
case CPOffState:
|
||||
case CPOnState:
|
||||
case CPMixedState: [_stateView setImage:shouldHighlight ? _CPMenuItemDefaultStateHighlightedImages[state] : _CPMenuItemDefaultStateImages[state]];
|
||||
[_imageAndTitleView setTextColor:shouldHighlight ? [CPColor whiteColor] : [self textColor]];
|
||||
|
||||
if (shouldHighlight)
|
||||
[self setBackgroundColor:_CPMenuItemSelectionColor];
|
||||
else
|
||||
[self setBackgroundColor:nil];
|
||||
|
||||
var state = [_menuItem state];
|
||||
|
||||
switch (state)
|
||||
{
|
||||
case CPOffState:
|
||||
case CPOnState:
|
||||
case CPMixedState: [_stateView setImage:shouldHighlight ? _CPMenuItemDefaultStateHighlightedImages[state] : _CPMenuItemDefaultStateImages[state]];
|
||||
break;
|
||||
|
||||
default: [_stateView setImage:nil];
|
||||
default: [_stateView setImage:nil];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user