mirror of
https://github.com/eeeXun/GTT.git
synced 2025-05-28 05:20:12 -07:00
fix(ui): wrong button color
After update tview (49200f8), the background color of button get wrong. The SetBackgroundColor doesn't work. Use SetStyle and SetActivatedStyle instead.
This commit is contained in:
parent
6555252e70
commit
993a8286a3
11
ui.go
11
ui.go
@ -155,10 +155,13 @@ func updateNonConfigColor() {
|
||||
|
||||
// button
|
||||
for _, button := range []*tview.Button{langButton, styleButton, keyMapButton} {
|
||||
button.SetLabelColor(uiStyle.ForegroundColor()).
|
||||
SetBackgroundColorActivated(uiStyle.PressColor()).
|
||||
SetLabelColorActivated(uiStyle.ForegroundColor()).
|
||||
SetBackgroundColor(uiStyle.SelectedColor())
|
||||
button.SetStyle(tcell.StyleDefault.
|
||||
Background(uiStyle.SelectedColor()).
|
||||
Foreground(uiStyle.ForegroundColor())).
|
||||
SetActivatedStyle(
|
||||
tcell.StyleDefault.
|
||||
Background(uiStyle.PressColor()).
|
||||
Foreground(uiStyle.ForegroundColor()))
|
||||
}
|
||||
|
||||
// key map
|
||||
|
Loading…
x
Reference in New Issue
Block a user