v/GTT
1
0
mirror of https://github.com/eeeXun/GTT.git synced 2025-05-21 10:00:59 -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 ( var (
Transparent tcell.Color = tcell.ColorDefault AllTheme = []string{"Gruvbox", "Nord"}
ThemesName = []string{"Gruvbox", "Nord"}
Palette = []string{"red", "green", "yellow", "blue", "purple", "cyan"} Palette = []string{"red", "green", "yellow", "blue", "purple", "cyan"}
Themes = map[string]map[string]tcell.Color{ Themes = map[string]map[string]tcell.Color{
"Gruvbox": { "Gruvbox": {
@ -64,7 +63,7 @@ func NewStyle() *Style {
func (s Style) BackgroundColor() tcell.Color { func (s Style) BackgroundColor() tcell.Color {
if s.Transparent { if s.Transparent {
return Transparent return tcell.ColorDefault
} }
return Themes[s.Theme][s.backgroundColor] return Themes[s.Theme][s.backgroundColor]
} }

4
ui.go
View File

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