mirror of
https://github.com/transmission/transmission.git
synced 2026-05-08 09:39:08 +01:00
better method of determining if a table cell is highlighted
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user