mirror of
https://github.com/eeeXun/GTT.git
synced 2025-06-01 15:30:51 -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
|
textColor tcell.Color
|
||||||
selectedColor tcell.Color
|
selectedColor tcell.Color
|
||||||
prefixColor tcell.Color
|
prefixColor tcell.Color
|
||||||
|
labelColor tcell.Color
|
||||||
pressColor tcell.Color
|
pressColor tcell.Color
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -61,6 +62,7 @@ func (w *Window) colorInit() {
|
|||||||
w.src.selectedColor = Themes[theme]["gray"]
|
w.src.selectedColor = Themes[theme]["gray"]
|
||||||
w.src.prefixColor = Themes[theme]["cyan"]
|
w.src.prefixColor = Themes[theme]["cyan"]
|
||||||
w.src.pressColor = Themes[theme]["purple"]
|
w.src.pressColor = Themes[theme]["purple"]
|
||||||
|
w.src.labelColor = Themes[theme]["yellow"]
|
||||||
w.dst.foregroundColor = Themes[theme]["fg"]
|
w.dst.foregroundColor = Themes[theme]["fg"]
|
||||||
w.dst.borderColor = Themes[theme]["blue"]
|
w.dst.borderColor = Themes[theme]["blue"]
|
||||||
w.dst.prefixColor = Themes[theme]["cyan"]
|
w.dst.prefixColor = Themes[theme]["cyan"]
|
||||||
|
30
ui.go
30
ui.go
@ -28,6 +28,20 @@ func updateBackground() {
|
|||||||
tcell.StyleDefault.
|
tcell.StyleDefault.
|
||||||
Background(window.src.selectedColor).
|
Background(window.src.selectedColor).
|
||||||
Foreground(window.src.prefixColor))
|
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
|
// update title and option
|
||||||
@ -68,19 +82,27 @@ func uiInit() {
|
|||||||
srcLangDropDown.SetOptions(Lang, nil)
|
srcLangDropDown.SetOptions(Lang, nil)
|
||||||
srcLangDropDown.SetFieldBackgroundColor(window.src.selectedColor).
|
srcLangDropDown.SetFieldBackgroundColor(window.src.selectedColor).
|
||||||
SetFieldTextColor(window.src.foregroundColor).
|
SetFieldTextColor(window.src.foregroundColor).
|
||||||
SetPrefixTextColor(window.dst.prefixColor)
|
SetPrefixTextColor(window.src.prefixColor)
|
||||||
srcLangDropDown.SetBorder(true).
|
srcLangDropDown.SetBorder(true).
|
||||||
SetBorderColor(window.src.borderColor).
|
SetBorderColor(window.src.borderColor).
|
||||||
SetTitleColor(window.src.borderColor)
|
SetTitleColor(window.src.borderColor)
|
||||||
dstLangDropDown.SetOptions(Lang, nil)
|
dstLangDropDown.SetOptions(Lang, nil)
|
||||||
dstLangDropDown.SetFieldBackgroundColor(window.src.selectedColor).
|
dstLangDropDown.SetFieldBackgroundColor(window.src.selectedColor).
|
||||||
SetFieldTextColor(window.src.foregroundColor).
|
SetFieldTextColor(window.src.foregroundColor).
|
||||||
SetPrefixTextColor(window.dst.prefixColor)
|
SetPrefixTextColor(window.src.prefixColor)
|
||||||
dstLangDropDown.SetBorder(true).
|
dstLangDropDown.SetBorder(true).
|
||||||
SetBorderColor(window.dst.borderColor).
|
SetBorderColor(window.dst.borderColor).
|
||||||
SetTitleColor(window.dst.borderColor)
|
SetTitleColor(window.dst.borderColor)
|
||||||
themeDropDown.SetOptions(themes_name, nil).SetLabel("Theme: ")
|
themeDropDown.SetOptions(themes_name, nil).
|
||||||
transparentDropDown.SetOptions([]string{"true", "false"}, nil).SetLabel("Transparent: ")
|
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
|
// button
|
||||||
langButton.SetLabelColor(window.src.foregroundColor).
|
langButton.SetLabelColor(window.src.foregroundColor).
|
||||||
|
Loading…
x
Reference in New Issue
Block a user