ensure up and down group arrows are colored correctly

This commit is contained in:
Mitchell Livingston 2008-02-19 02:59:01 +00:00
parent ac300eab89
commit 6fcf4a8013
2 changed files with 13 additions and 7 deletions

View File

@ -2486,10 +2486,7 @@ void sleepCallBack(void * controller, io_service_t y, natural_t messageType, voi
: NSLocalizedString(@"No Group", "Group table row");
}
else if ([ident isEqualToString: @"Color"])
{
int group = [[item objectForKey: @"Group"] intValue];
return [[GroupsWindowController groups] imageForIndex: group isSmall: YES];
}
return [[GroupsWindowController groups] imageForIndex: [[item objectForKey: @"Group"] intValue] isSmall: YES];
else if ([ident isEqualToString: @"UL Image"])
return [NSImage imageNamed: @"UpArrowGroupTemplate.png"];
else if ([ident isEqualToString: @"DL Image"])

View File

@ -156,9 +156,18 @@
}
else
{
if (([[tableColumn identifier] isEqualToString: @"UL Image"] || [[tableColumn identifier] isEqualToString: @"DL Image"])
&& [NSApp isOnLeopardOrBetter])
[[cell image] setTemplate: [cell backgroundStyle] == NSBackgroundStyleLowered]; //ensure white only when selected
if ([[tableColumn identifier] isEqualToString: @"UL Image"] || [[tableColumn identifier] isEqualToString: @"DL Image"])
{
//ensure white only when selected
NSImage * image = [cell image];
BOOL template = [cell backgroundStyle] == NSBackgroundStyleLowered;
if ([image isTemplate] != template)
{
[image setTemplate: template];
[cell setImage: nil];
[cell setImage: image];
}
}
}
}