add global default ColorMap

This commit is contained in:
Bradley Cicenas
2017-03-08 10:40:03 +11:00
parent 02610c59da
commit b8eb386360
14 changed files with 63 additions and 30 deletions

View File

@@ -18,7 +18,7 @@ func (row *Compact) SetCPU(val int) {
row.Cpu.Label = fmt.Sprintf("%s%%", strconv.Itoa(val))
if val < 5 {
val = 5
row.Cpu.BarColor = ui.ColorBlack
row.Cpu.BarColor = ui.ThemeAttr("gauge.bar.bg")
}
row.Cpu.Percent = val
}
@@ -29,7 +29,7 @@ func (row *Compact) SetMem(val int64, limit int64, percent int) {
percent = 5
row.Memory.BarColor = ui.ColorBlack
} else {
row.Memory.BarColor = ui.ColorGreen
row.Memory.BarColor = ui.ThemeAttr("gauge.bar.bg")
}
row.Memory.Percent = percent
}