Use default color for selected tab
This commit is contained in:
parent
28021ede1b
commit
e463c38476
|
@ -72,13 +72,19 @@ func (tabs *Tabs) Select(index int) {
|
||||||
func (strip *TabStrip) Draw(ctx *Context) {
|
func (strip *TabStrip) Draw(ctx *Context) {
|
||||||
x := 0
|
x := 0
|
||||||
for i, tab := range strip.Tabs {
|
for i, tab := range strip.Tabs {
|
||||||
style := tcell.StyleDefault.Background(tcell.ColorWhite).Foreground(tcell.ColorBlack)
|
style := tcell.StyleDefault.
|
||||||
|
Background(tcell.ColorWhite).
|
||||||
|
Foreground(tcell.ColorBlack)
|
||||||
if strip.Selected == i {
|
if strip.Selected == i {
|
||||||
style = style.Reverse(true)
|
style = tcell.StyleDefault.
|
||||||
|
Background(tcell.ColorDefault).
|
||||||
|
Foreground(tcell.ColorDefault)
|
||||||
}
|
}
|
||||||
x += ctx.Printf(x, 0, style, " %s ", tab.Name)
|
x += ctx.Printf(x, 0, style, " %s ", tab.Name)
|
||||||
}
|
}
|
||||||
style := tcell.StyleDefault.Background(tcell.ColorWhite).Foreground(tcell.ColorBlack)
|
style := tcell.StyleDefault.
|
||||||
|
Background(tcell.ColorWhite).
|
||||||
|
Foreground(tcell.ColorBlack)
|
||||||
ctx.Fill(x, 0, ctx.Width()-x, 1, ' ', style)
|
ctx.Fill(x, 0, ctx.Width()-x, 1, ' ', style)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue