Use default color for selected tab
This commit is contained in:
parent
28021ede1b
commit
e463c38476
1 changed files with 9 additions and 3 deletions
|
@ -72,13 +72,19 @@ func (tabs *Tabs) Select(index int) {
|
|||
func (strip *TabStrip) Draw(ctx *Context) {
|
||||
x := 0
|
||||
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 {
|
||||
style = style.Reverse(true)
|
||||
style = tcell.StyleDefault.
|
||||
Background(tcell.ColorDefault).
|
||||
Foreground(tcell.ColorDefault)
|
||||
}
|
||||
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)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue