Skip to content

Commit

Permalink
Merge pull request #133 from mdhorn/textview-style
Browse files Browse the repository at this point in the history
style: propagate style to view contents
  • Loading branch information
VladimirMarkelov authored Jan 15, 2020
2 parents c44c556 + 890ef2c commit 3c83a0f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion textview.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 3c83a0f

Please sign in to comment.