mirror of
https://github.com/eeeXun/GTT.git
synced 2025-05-28 05:20:12 -07:00
labelColor
This commit is contained in:
parent
b77ccc2e78
commit
98fbf5b91c
2
color.go
2
color.go
@ -40,6 +40,7 @@ type Colors struct {
|
||||
textColor tcell.Color
|
||||
selectedColor tcell.Color
|
||||
prefixColor tcell.Color
|
||||
labelColor tcell.Color
|
||||
pressColor tcell.Color
|
||||
}
|
||||
|
||||
@ -61,6 +62,7 @@ func (w *Window) colorInit() {
|
||||
w.src.selectedColor = Themes[theme]["gray"]
|
||||
w.src.prefixColor = Themes[theme]["cyan"]
|
||||
w.src.pressColor = Themes[theme]["purple"]
|
||||
w.src.labelColor = Themes[theme]["yellow"]
|
||||
w.dst.foregroundColor = Themes[theme]["fg"]
|
||||
w.dst.borderColor = Themes[theme]["blue"]
|
||||
w.dst.prefixColor = Themes[theme]["cyan"]
|
||||
|
30
ui.go
30
ui.go
@ -28,6 +28,20 @@ func updateBackground() {
|
||||
tcell.StyleDefault.
|
||||
Background(window.src.selectedColor).
|
||||
Foreground(window.src.prefixColor))
|
||||
themeDropDown.SetBackgroundColor(window.src.backgroundColor)
|
||||
themeDropDown.SetListStyles(tcell.StyleDefault.
|
||||
Background(window.src.backgroundColor).
|
||||
Foreground(window.src.foregroundColor),
|
||||
tcell.StyleDefault.
|
||||
Background(window.src.selectedColor).
|
||||
Foreground(window.src.prefixColor))
|
||||
transparentDropDown.SetBackgroundColor(window.src.backgroundColor)
|
||||
transparentDropDown.SetListStyles(tcell.StyleDefault.
|
||||
Background(window.src.backgroundColor).
|
||||
Foreground(window.src.foregroundColor),
|
||||
tcell.StyleDefault.
|
||||
Background(window.src.selectedColor).
|
||||
Foreground(window.src.prefixColor))
|
||||
}
|
||||
|
||||
// update title and option
|
||||
@ -68,19 +82,27 @@ func uiInit() {
|
||||
srcLangDropDown.SetOptions(Lang, nil)
|
||||
srcLangDropDown.SetFieldBackgroundColor(window.src.selectedColor).
|
||||
SetFieldTextColor(window.src.foregroundColor).
|
||||
SetPrefixTextColor(window.dst.prefixColor)
|
||||
SetPrefixTextColor(window.src.prefixColor)
|
||||
srcLangDropDown.SetBorder(true).
|
||||
SetBorderColor(window.src.borderColor).
|
||||
SetTitleColor(window.src.borderColor)
|
||||
dstLangDropDown.SetOptions(Lang, nil)
|
||||
dstLangDropDown.SetFieldBackgroundColor(window.src.selectedColor).
|
||||
SetFieldTextColor(window.src.foregroundColor).
|
||||
SetPrefixTextColor(window.dst.prefixColor)
|
||||
SetPrefixTextColor(window.src.prefixColor)
|
||||
dstLangDropDown.SetBorder(true).
|
||||
SetBorderColor(window.dst.borderColor).
|
||||
SetTitleColor(window.dst.borderColor)
|
||||
themeDropDown.SetOptions(themes_name, nil).SetLabel("Theme: ")
|
||||
transparentDropDown.SetOptions([]string{"true", "false"}, nil).SetLabel("Transparent: ")
|
||||
themeDropDown.SetOptions(themes_name, nil).
|
||||
SetLabel("Theme: ").SetLabelColor(window.src.labelColor)
|
||||
themeDropDown.SetFieldBackgroundColor(window.src.selectedColor).
|
||||
SetFieldTextColor(window.src.foregroundColor).
|
||||
SetPrefixTextColor(window.src.prefixColor)
|
||||
transparentDropDown.SetOptions([]string{"true", "false"}, nil).
|
||||
SetLabel("Transparent: ").SetLabelColor(window.src.labelColor)
|
||||
transparentDropDown.SetFieldBackgroundColor(window.src.selectedColor).
|
||||
SetFieldTextColor(window.src.foregroundColor).
|
||||
SetPrefixTextColor(window.src.prefixColor)
|
||||
|
||||
// button
|
||||
langButton.SetLabelColor(window.src.foregroundColor).
|
||||
|
Loading…
x
Reference in New Issue
Block a user