From 3858f817c575bf7513ec8c3b76fee5f5b3c359ee Mon Sep 17 00:00:00 2001 From: Mitchell Livingston Date: Fri, 30 Nov 2007 02:49:40 +0000 Subject: [PATCH] better method of determining if a table cell is highlighted --- macosx/FileNameCell.m | 3 +-- macosx/TorrentCell.m | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/macosx/FileNameCell.m b/macosx/FileNameCell.m index 1ee09db92..b452a9257 100644 --- a/macosx/FileNameCell.m +++ b/macosx/FileNameCell.m @@ -91,8 +91,7 @@ //title NSColor * specialColor = nil; - if ([self isHighlighted] - && [[self highlightColorWithFrame: cellFrame inView: controlView] isEqual: [NSColor alternateSelectedControlColor]]) + if ([self isHighlighted] && [[controlView window] isKeyWindow] && [[controlView window] firstResponder] == controlView) specialColor = [NSColor whiteColor]; else if ([[(FileOutlineView *)[self controlView] torrent] checkForFiles: [[self objectValue] objectForKey: @"Indexes"]] == NSOffState) diff --git a/macosx/TorrentCell.m b/macosx/TorrentCell.m index 6dd910a6d..c93fa8219 100644 --- a/macosx/TorrentCell.m +++ b/macosx/TorrentCell.m @@ -223,8 +223,7 @@ //text color NSColor * titleColor, * statusColor; - if ([self isHighlighted] - && [[self highlightColorWithFrame: cellFrame inView: controlView] isEqual: [NSColor alternateSelectedControlColor]]) + if ([self isHighlighted] && [[controlView window] isKeyWindow] && [[controlView window] firstResponder] == controlView) { titleColor = [NSColor whiteColor]; statusColor = [NSColor whiteColor];