1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2025-02-03 04:53:27 +00:00

Better way to determine highlighted color

This commit is contained in:
Mitchell Livingston 2006-07-16 17:12:25 +00:00
parent 7c4bde6f8a
commit b81f910a72
2 changed files with 3 additions and 2 deletions

View file

@ -48,7 +48,7 @@
[stringShadow setShadowBlurRadius: 4.0]; [stringShadow setShadowBlurRadius: 4.0];
NSFont * boldFont = [[NSFontManager sharedFontManager] convertFont: NSFont * boldFont = [[NSFontManager sharedFontManager] convertFont:
[NSFont fontWithName: @"Helvetica" size: 28.0] toHaveTrait: NSBoldFontMask]; [NSFont fontWithName: @"Helvetica" size: 28.0] toHaveTrait: NSBoldFontMask];
fAttributes = [[NSDictionary alloc] initWithObjectsAndKeys: fAttributes = [[NSDictionary alloc] initWithObjectsAndKeys:
[NSColor whiteColor], NSForegroundColorAttributeName, [NSColor whiteColor], NSForegroundColorAttributeName,

View file

@ -282,7 +282,8 @@ static uint32_t kRed = BE(0xFF6450FF), //255, 100, 80
- (void) drawWithFrame: (NSRect) cellFrame inView: (NSView *) view - (void) drawWithFrame: (NSRect) cellFrame inView: (NSView *) view
{ {
BOOL highlighted = [self isHighlighted] && [[view window] isKeyWindow]; BOOL highlighted = [self isHighlighted] && [[self highlightColorWithFrame: cellFrame inView: view]
isEqual: [NSColor alternateSelectedControlColor]];
NSDictionary * nameAttributes = [[NSDictionary alloc] initWithObjectsAndKeys: NSDictionary * nameAttributes = [[NSDictionary alloc] initWithObjectsAndKeys:
highlighted ? [NSColor whiteColor] : [NSColor blackColor], highlighted ? [NSColor whiteColor] : [NSColor blackColor],
NSForegroundColorAttributeName, NSForegroundColorAttributeName,