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:
parent
c44c556439
commit
890ef2c575
|
@ -98,7 +98,10 @@ func (l *TextView) drawText() {
|
||||||
maxWidth := l.width - 1
|
maxWidth := l.width - 1
|
||||||
maxHeight := l.outputHeight()
|
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)
|
SetTextColor(fg)
|
||||||
SetBackColor(bg)
|
SetBackColor(bg)
|
||||||
|
|
Loading…
Reference in New Issue