implement full-row cursor highlighting

This commit is contained in:
Bradley Cicenas
2018-09-17 01:24:06 +00:00
parent ac5bed210f
commit cf352f7c8a
4 changed files with 68 additions and 10 deletions

View File

@@ -23,6 +23,16 @@ func (w *GaugeCol) Reset() {
w.Percent = 0
}
func (w *GaugeCol) Highlight() {
w.Bg = ui.ThemeAttr("par.text.fg")
w.PercentColor = ui.ThemeAttr("par.text.hi")
}
func (w *GaugeCol) UnHighlight() {
w.Bg = ui.ThemeAttr("par.text.bg")
w.PercentColor = ui.ThemeAttr("par.text.bg")
}
func colorScale(n int) ui.Attribute {
if n > 70 {
return ui.ThemeAttr("status.danger")