v/GTT
1
0
mirror of https://github.com/eeeXun/GTT.git synced 2025-05-18 08:40:35 -07:00

feat: enable select borderColor

This commit is contained in:
eeeXun 2022-10-24 16:57:33 +08:00
parent 8901983ccc
commit e208428e8a

18
ui.go
View File

@ -197,11 +197,13 @@ func uiInit() {
IndexOf(strconv.FormatBool(transparent), IndexOf(strconv.FormatBool(transparent),
[]string{"true", "false"})) []string{"true", "false"}))
srcBorderDropDown.SetLabel("Border Color: "). srcBorderDropDown.SetLabel("Border Color: ").
SetOptions(Palette, nil) SetOptions(Palette, nil).
SetCurrentOption(IndexOf(style.SrcBorderStr(), Palette))
srcBorderDropDown.SetBorder(true). srcBorderDropDown.SetBorder(true).
SetTitle("Source") SetTitle("Source")
dstBorderDropDown.SetLabel("Border Color: "). dstBorderDropDown.SetLabel("Border Color: ").
SetOptions(Palette, nil) SetOptions(Palette, nil).
SetCurrentOption(IndexOf(style.DstBorderStr(), Palette))
dstBorderDropDown.SetBorder(true). dstBorderDropDown.SetBorder(true).
SetTitle("Destination") SetTitle("Destination")
@ -258,8 +260,16 @@ func uiInit() {
SetSelectedFunc(themeSelected) SetSelectedFunc(themeSelected)
transparentDropDown.SetDoneFunc(styleDropDownHandler). transparentDropDown.SetDoneFunc(styleDropDownHandler).
SetSelectedFunc(transparentSelected) SetSelectedFunc(transparentSelected)
srcBorderDropDown.SetDoneFunc(styleDropDownHandler) srcBorderDropDown.SetDoneFunc(styleDropDownHandler).
dstBorderDropDown.SetDoneFunc(styleDropDownHandler) SetSelectedFunc(func(text string, index int) {
style.SetSrcBorderColor(text)
updateBorderColor()
})
dstBorderDropDown.SetDoneFunc(styleDropDownHandler).
SetSelectedFunc(func(text string, index int) {
style.SetDstBorderColor(text)
updateBorderColor()
})
langButton.SetSelectedFunc(func() { langButton.SetSelectedFunc(func() {
mainPage.HidePage("stylePage") mainPage.HidePage("stylePage")
mainPage.ShowPage("langPage") mainPage.ShowPage("langPage")