Skip to content

Commit

Permalink
util/uiutil/widget/text: fix correct color update on theme cycling.
Browse files Browse the repository at this point in the history
  • Loading branch information
jmigpin committed Jun 11, 2022
1 parent 4d2524a commit aa4a91c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions util/uiutil/widget/text.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,9 @@ func (t *Text) Paint() {
//----------

func (t *Text) OnThemeChange() {
// word highlight ops (contain fg/bg colors) are cached. A contentchanged() here is the easiest way to invalidate the cache and have all the colors be updated.
t.Drawer.ContentChanged()

fg := t.TreeThemePaletteColor("text_fg")
t.Drawer.SetFg(fg)

Expand Down

0 comments on commit aa4a91c

Please sign in to comment.