mirror of
https://github.com/textmate/textmate.git
synced 2026-04-28 03:00:34 -04:00
Use the correct selected text color (for lists)
This commit is contained in:
@@ -885,13 +885,13 @@ NSString* const FFFindWasTriggeredByEnter = @"FFFindWasTriggeredByEnter";
|
||||
{
|
||||
[cell setEnabled:!self.performedReplaceAll];
|
||||
}
|
||||
else if([[tableColumn identifier] isEqualToString:@"match"] && [cell isHighlighted])
|
||||
else if([[tableColumn identifier] isEqualToString:@"match"] && [cell backgroundStyle] == NSBackgroundStyleDark)
|
||||
{
|
||||
id obj = [cell objectValue];
|
||||
if([obj isKindOfClass:[NSAttributedString class]])
|
||||
{
|
||||
NSMutableAttributedString* str = [obj mutableCopy];
|
||||
[str addAttribute:NSForegroundColorAttributeName value:[NSColor selectedTextColor] range:NSMakeRange(0, [str length])];
|
||||
[str addAttribute:NSForegroundColorAttributeName value:[NSColor alternateSelectedControlTextColor] range:NSMakeRange(0, [str length])];
|
||||
[cell setAttributedStringValue:str];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -272,13 +272,13 @@ static void* kOakPasteboardChooserCurrentEntryBinding = &kOakPasteboardChooserCu
|
||||
|
||||
- (void)tableView:(NSTableView*)aTableView willDisplayCell:(id)aCell forTableColumn:(NSTableColumn*)aTableColumn row:(NSInteger)rowIndex
|
||||
{
|
||||
if([aCell isHighlighted] && [[aTableColumn identifier] isEqualToString:@"name"])
|
||||
if([aCell backgroundStyle] == NSBackgroundStyleDark && [[aTableColumn identifier] isEqualToString:@"name"])
|
||||
{
|
||||
id obj = [aCell objectValue];
|
||||
if([obj isKindOfClass:[NSAttributedString class]])
|
||||
{
|
||||
NSMutableAttributedString* str = [obj mutableCopy];
|
||||
[str addAttribute:NSForegroundColorAttributeName value:[NSColor selectedTextColor] range:NSMakeRange(0, [str length])];
|
||||
[str addAttribute:NSForegroundColorAttributeName value:[NSColor alternateSelectedControlTextColor] range:NSMakeRange(0, [str length])];
|
||||
[aCell setAttributedStringValue:str];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user