(drawKeyEquivalentWithFrame:inView:): use NCell's textColor instead of check

if we're disabled/enabled.
This commit is contained in:
Sergii Stoian 2019-04-10 12:08:33 +03:00
parent 1b0e90686a
commit 4da4aa142b
2 changed files with 6 additions and 7 deletions

View file

@ -1,3 +1,8 @@
2019-04-10 Sergii Stoian <stoyan255@gmail.com>
* Source/NSMenuItemCell.m (drawKeyEquivalentWithFrame:inView:):
use NCell's textColor instead of check if we're disabled/enabled.
2019-04-10 Sergii Stoian <stoyan255@ukr.net>
* Source/NSMenuItemCell.m (drawKeyEquivalentWithFrame:inView:):

View file

@ -789,15 +789,9 @@ static NSString *commandKeyString = @"#";
NSDictionary *attrs;
NSArray *attrObjects, *attrKeys;
NSAttributedString *aString;
NSColor *aColor;
if (_cell.is_disabled)
aColor = [NSColor disabledControlTextColor];
else
aColor = [NSColor controlTextColor];
attrObjects = [NSArray arrayWithObjects: _keyEquivalentFont,
aColor, nil];
[self textColor], nil];
attrKeys = [NSArray arrayWithObjects: NSFontAttributeName,
NSForegroundColorAttributeName, nil];
attrs = [NSDictionary dictionaryWithObjects: attrObjects