v/GTT
1
0
mirror of https://github.com/eeeXun/GTT.git synced 2025-05-21 01:50:36 -07:00

remove transparent color

This commit is contained in:
eeeXun 2022-10-24 17:49:04 +08:00
parent 7eaee14787
commit c786dec824
2 changed files with 4 additions and 5 deletions

View File

@ -5,8 +5,7 @@ import (
)
var (
Transparent tcell.Color = tcell.ColorDefault
ThemesName = []string{"Gruvbox", "Nord"}
AllTheme = []string{"Gruvbox", "Nord"}
Palette = []string{"red", "green", "yellow", "blue", "purple", "cyan"}
Themes = map[string]map[string]tcell.Color{
"Gruvbox": {
@ -64,7 +63,7 @@ func NewStyle() *Style {
func (s Style) BackgroundColor() tcell.Color {
if s.Transparent {
return Transparent
return tcell.ColorDefault
}
return Themes[s.Theme][s.backgroundColor]
}

4
ui.go
View File

@ -193,8 +193,8 @@ func uiInit() {
dstLangDropDown.SetBorder(true)
dstLangDropDown.SetOptions(Lang, nil)
themeDropDown.SetLabel("Theme: ").
SetOptions(ThemesName, nil).
SetCurrentOption(IndexOf(style.Theme, ThemesName))
SetOptions(AllTheme, nil).
SetCurrentOption(IndexOf(style.Theme, AllTheme))
transparentDropDown.SetLabel("Transparent: ").
SetOptions([]string{"true", "false"}, nil).
SetCurrentOption(