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

@@ -14,7 +14,6 @@ func NewGaugeCol() *GaugeCol {
g.Border = false
g.Percent = 0
g.PaddingBottom = 0
g.BarColor = ui.ColorGreen
g.Label = "-"
return &GaugeCol{g}
}

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
}

View File

@@ -17,7 +17,7 @@ func NewTextCol(s string) *TextCol {
}
func (w *TextCol) Highlight() {
w.TextFgColor = ui.ThemeAttr("par.text.bg")
w.TextFgColor = ui.ColorBlack
w.TextBgColor = ui.ThemeAttr("par.text.fg")
}