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

@@ -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}

View File

@@ -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)

View File

@@ -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

View File

@@ -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}