set dark mode background for multiline control

This commit is contained in:
Ian Bastos 2020-01-12 17:56:36 +00:00
parent 14288b9b0c
commit 0316998e1c
1 changed files with 6 additions and 1 deletions

View File

@ -151,7 +151,7 @@ static uiMultilineEntry *finishMultilineEntry(BOOL hscroll)
[e->tv setRulerVisible:NO];
if (isDarkMode()) {
[e->tv setBackgroundColor:[NSColor controlBackgroundColor]];
e->tv.backgroundColor = NSColor.textBackgroundColor;
} else {
[e->tv setBackgroundColor:[NSColor colorWithCalibratedWhite:1.0 alpha:1.0]];
}
@ -234,6 +234,11 @@ static uiMultilineEntry *finishMultilineEntry(BOOL hscroll)
p.VScroll = YES;
e->sv = uiprivMkScrollView(&p, &(e->d));
if (isDarkMode()) {
e->sv.drawsBackground= YES;
e->sv.backgroundColor = NSColor.textBackgroundColor;
}
uiMultilineEntryOnChanged(e, defaultOnChanged, NULL);
return e;