From b81f910a72e12b5b6562b281b4f19cf1ed6bd112 Mon Sep 17 00:00:00 2001 From: Mitchell Livingston Date: Sun, 16 Jul 2006 17:12:25 +0000 Subject: [PATCH] Better way to determine highlighted color --- macosx/Badger.m | 2 +- macosx/TorrentCell.m | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/macosx/Badger.m b/macosx/Badger.m index a3feea884..15d5b3265 100644 --- a/macosx/Badger.m +++ b/macosx/Badger.m @@ -48,7 +48,7 @@ [stringShadow setShadowBlurRadius: 4.0]; 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: [NSColor whiteColor], NSForegroundColorAttributeName, diff --git a/macosx/TorrentCell.m b/macosx/TorrentCell.m index 76c9d2106..ac3741b6c 100644 --- a/macosx/TorrentCell.m +++ b/macosx/TorrentCell.m @@ -282,7 +282,8 @@ static uint32_t kRed = BE(0xFF6450FF), //255, 100, 80 - (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: highlighted ? [NSColor whiteColor] : [NSColor blackColor], NSForegroundColorAttributeName,