mirror of
https://github.com/VladimirMarkelov/clui.git
synced 2025-04-24 13:48:53 +08:00
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
|
||||
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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user