mirror of
https://github.com/eeeXun/GTT.git
synced 2025-06-01 07:20:53 -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
|
// button
|
||||||
for _, button := range []*tview.Button{langButton, styleButton, keyMapButton} {
|
for _, button := range []*tview.Button{langButton, styleButton, keyMapButton} {
|
||||||
button.SetLabelColor(uiStyle.ForegroundColor()).
|
button.SetStyle(tcell.StyleDefault.
|
||||||
SetBackgroundColorActivated(uiStyle.PressColor()).
|
Background(uiStyle.SelectedColor()).
|
||||||
SetLabelColorActivated(uiStyle.ForegroundColor()).
|
Foreground(uiStyle.ForegroundColor())).
|
||||||
SetBackgroundColor(uiStyle.SelectedColor())
|
SetActivatedStyle(
|
||||||
|
tcell.StyleDefault.
|
||||||
|
Background(uiStyle.PressColor()).
|
||||||
|
Foreground(uiStyle.ForegroundColor()))
|
||||||
}
|
}
|
||||||
|
|
||||||
// key map
|
// key map
|
||||||
|
Loading…
x
Reference in New Issue
Block a user