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:
@@ -17,8 +17,6 @@ func NewCpu() *Cpu {
|
||||
cpu.Width = colWidth[0]
|
||||
cpu.X = 0
|
||||
cpu.DataLabels = cpu.hist.Labels
|
||||
cpu.AxesColor = ui.ColorDefault
|
||||
cpu.LineColor = ui.ColorGreen
|
||||
|
||||
// hack to force the default minY scale to 0
|
||||
tmpData := []float64{20}
|
||||
|
||||
@@ -15,7 +15,7 @@ func NewInfo(id string) *Info {
|
||||
p := ui.NewTable()
|
||||
p.Height = 4
|
||||
p.Width = colWidth[0]
|
||||
p.FgColor = ui.ColorWhite
|
||||
p.FgColor = ui.ThemeAttr("par.text.fg")
|
||||
p.Seperator = false
|
||||
i := &Info{p, make(map[string]string)}
|
||||
i.Set("id", id)
|
||||
|
||||
@@ -57,7 +57,6 @@ func newMemLabel() *ui.Par {
|
||||
p.Border = false
|
||||
p.Height = 1
|
||||
p.Width = 20
|
||||
p.TextFgColor = ui.ColorDefault
|
||||
return p
|
||||
}
|
||||
|
||||
@@ -67,9 +66,6 @@ func newMemChart() *ui.MBarChart {
|
||||
mbar.Border = false
|
||||
mbar.BarGap = 1
|
||||
mbar.BarWidth = 6
|
||||
mbar.TextColor = ui.ColorDefault
|
||||
|
||||
mbar.BarColor[0] = ui.ColorGreen
|
||||
|
||||
mbar.BarColor[1] = ui.ColorBlack
|
||||
mbar.NumColor[1] = ui.ColorBlack
|
||||
|
||||
@@ -26,14 +26,12 @@ func NewNet() *Net {
|
||||
rx.Title = "RX"
|
||||
rx.Height = 1
|
||||
rx.Data = net.rxHist.Data
|
||||
rx.TitleColor = ui.ColorDefault
|
||||
rx.LineColor = ui.ColorGreen
|
||||
|
||||
tx := ui.NewSparkline()
|
||||
tx.Title = "TX"
|
||||
tx.Height = 1
|
||||
tx.Data = net.txHist.Data
|
||||
tx.TitleColor = ui.ColorDefault
|
||||
tx.LineColor = ui.ColorYellow
|
||||
|
||||
net.Lines = []ui.Sparkline{rx, tx}
|
||||
|
||||
Reference in New Issue
Block a user