mirror of
https://github.com/bcicen/ctop.git
synced 2025-12-06 15:16:41 +08:00
add global default ColorMap
This commit is contained in:
@@ -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}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user