forked from tslocum/cview
fix(form/Draw): Use button colors for focused state
This commit is contained in:
parent
367d377081
commit
128c6692d4
5
form.go
5
form.go
|
@ -687,8 +687,8 @@ func (f *Form) Draw(screen tcell.Screen) {
|
|||
buttonWidth = space
|
||||
}
|
||||
button.SetLabelColor(f.buttonTextColor).
|
||||
SetLabelColorFocused(f.buttonBackgroundColor).
|
||||
SetBackgroundColorFocused(f.buttonTextColor).
|
||||
SetLabelColorFocused(f.buttonTextColorFocused).
|
||||
SetBackgroundColorFocused(f.buttonBackgroundColorFocused).
|
||||
SetBackgroundColor(f.buttonBackgroundColor)
|
||||
|
||||
buttonIndex := index + len(f.items)
|
||||
|
@ -735,6 +735,7 @@ func (f *Form) Draw(screen tcell.Screen) {
|
|||
|
||||
// Draw buttons.
|
||||
for index, button := range f.buttons {
|
||||
|
||||
// Set position.
|
||||
buttonIndex := index + len(f.items)
|
||||
y := positions[buttonIndex].y - offset
|
||||
|
|
Loading…
Reference in New Issue