Added custom text color for gauge when the text is highlighted (i.e. the
gauge bar is over the text).
This commit is contained in:
@@ -56,7 +56,18 @@ func main() {
|
||||
g3.Label = "{{percent}}% (100MBs free)"
|
||||
g3.LabelAlign = termui.AlignRight
|
||||
|
||||
termui.Render(g0, g1, g2, g3)
|
||||
g4 := termui.NewGauge()
|
||||
g4.Percent = 50
|
||||
g4.Width = 50
|
||||
g4.Height = 3
|
||||
g4.Y = 14
|
||||
g4.Border.Label = "Gauge"
|
||||
g4.Label = "Gauge with custom highlighted label"
|
||||
g4.PercentColor = termui.ColorYellow
|
||||
g4.BarColor = termui.ColorGreen
|
||||
g4.PercentColorHighlighted = termui.ColorBlack
|
||||
|
||||
termui.Render(g0, g1, g2, g3, g4)
|
||||
|
||||
<-termui.EventCh()
|
||||
}
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 50 KiB |
Reference in New Issue
Block a user