fix log window to work better in dark mode.

This commit is contained in:
Kelvin Sherlock 2021-01-02 11:43:07 -05:00
parent e86b5c3236
commit c88fe397f7
1 changed files with 4 additions and 1 deletions

View File

@ -97,7 +97,10 @@ static NSURL *MameWorkingDirectory(void) {
{
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];
}
}