style: propagate style to view contents

Setting style on a text view now also applies to contents
within the window.
This commit is contained in:
Mark D Horn 2020-01-14 18:02:12 -08:00
parent c44c556439
commit 890ef2c575
1 changed files with 4 additions and 1 deletions

View File

@ -98,7 +98,10 @@ func (l *TextView) drawText() {
maxWidth := l.width - 1
maxHeight := l.outputHeight()
fg, bg := l.TextColor(), l.BackColor()
bg, fg := RealColor(l.bg, l.Style(), ColorEditBack), RealColor(l.fg, l.Style(), ColorEditText)
if l.Active() {
bg, fg = RealColor(l.bg, l.Style(), ColorEditActiveBack), RealColor(l.fg, l.Style(), ColorEditActiveText)
}
SetTextColor(fg)
SetBackColor(bg)