Skip to content

Commit

Permalink
fix log window to work better in dark mode.
Browse files Browse the repository at this point in the history
  • Loading branch information
ksherlock committed Jan 2, 2021
1 parent e86b5c3 commit c88fe39
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Ample/LogWindowController.m
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,10 @@ -(void)appendString: (NSString *)string
{
if ([string length])
{
[[[_textView textStorage] mutableString] appendString: string];
// needs explicit color attribute for proper dark mode support.
NSDictionary *attr = @{ NSForegroundColorAttributeName: [NSColor textColor] };
NSAttributedString *astr = [[NSAttributedString alloc] initWithString: string attributes: attr];
[[_textView textStorage] appendAttributedString: astr];
}
}

Expand Down

0 comments on commit c88fe39

Please sign in to comment.