Switch the theme live
Widgets copy their colors when they are created, so they now get role tokens (one unique RGB value per role) instead of colors, and a wrapper around the tcell screen replaces the tokens with the current theme's colors in SetContent. Changing the theme in the Config view swaps that table; the next draw recolors everything. Poster colors that equal a token are nudged off it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019reK4DUGYqDUjniWYJvwUW
This commit is contained in:
@@ -458,8 +458,8 @@ func (c *coverView) build(cols, rows int) []styledCell {
|
||||
}
|
||||
ch, fg, bg := st.bestCell(px)
|
||||
cells = append(cells, styledCell{ch,
|
||||
tcell.NewRGBColor(int32(fg.R), int32(fg.G), int32(fg.B)),
|
||||
tcell.NewRGBColor(int32(bg.R), int32(bg.G), int32(bg.B))})
|
||||
notToken(tcell.NewRGBColor(int32(fg.R), int32(fg.G), int32(fg.B))),
|
||||
notToken(tcell.NewRGBColor(int32(bg.R), int32(bg.G), int32(bg.B)))})
|
||||
}
|
||||
}
|
||||
return cells
|
||||
|
||||
Reference in New Issue
Block a user