mirror of
https://github.com/eeeXun/GTT.git
synced 2025-05-17 08:10:22 -07:00
fix SetSelectedFunc not work, should put at bottom
This commit is contained in:
parent
4b6561d3dd
commit
a11b2f181e
17
ui.go
17
ui.go
@ -23,7 +23,6 @@ func update_background() {
|
|||||||
Foreground(window.src.prefix_color))
|
Foreground(window.src.prefix_color))
|
||||||
|
|
||||||
dst_dropdown.SetBackgroundColor(window.dst.background_color)
|
dst_dropdown.SetBackgroundColor(window.dst.background_color)
|
||||||
// dst_dropdown.SetFieldBackgroundColor(window.src.selected_color)
|
|
||||||
dst_dropdown.SetListStyles(tcell.StyleDefault.
|
dst_dropdown.SetListStyles(tcell.StyleDefault.
|
||||||
Background(window.src.background_color).
|
Background(window.src.background_color).
|
||||||
Foreground(window.src.foreground_color),
|
Foreground(window.src.foreground_color),
|
||||||
@ -35,14 +34,6 @@ func update_background() {
|
|||||||
func ui_init() {
|
func ui_init() {
|
||||||
update_background()
|
update_background()
|
||||||
|
|
||||||
// handler
|
|
||||||
pages.SetInputCapture(PagesHandler)
|
|
||||||
translate_page.SetInputCapture(TranslatePageHandler)
|
|
||||||
src_dropdown.SetDoneFunc(SrcDropDownHandler)
|
|
||||||
src_dropdown.SetSelectedFunc(SrcSelected)
|
|
||||||
dst_dropdown.SetDoneFunc(DstDropDownHandler)
|
|
||||||
dst_dropdown.SetSelectedFunc(DstSelected)
|
|
||||||
|
|
||||||
// box
|
// box
|
||||||
src_box.SetBorder(true).
|
src_box.SetBorder(true).
|
||||||
SetTitle(translator.src_lang).
|
SetTitle(translator.src_lang).
|
||||||
@ -78,6 +69,14 @@ func ui_init() {
|
|||||||
SetTitle(translator.dst_lang).
|
SetTitle(translator.dst_lang).
|
||||||
SetBorderColor(window.dst.border_color).
|
SetBorderColor(window.dst.border_color).
|
||||||
SetTitleColor(window.dst.border_color)
|
SetTitleColor(window.dst.border_color)
|
||||||
|
|
||||||
|
// handler
|
||||||
|
pages.SetInputCapture(PagesHandler)
|
||||||
|
translate_page.SetInputCapture(TranslatePageHandler)
|
||||||
|
src_dropdown.SetDoneFunc(SrcDropDownHandler)
|
||||||
|
src_dropdown.SetSelectedFunc(SrcSelected)
|
||||||
|
dst_dropdown.SetDoneFunc(DstDropDownHandler)
|
||||||
|
dst_dropdown.SetSelectedFunc(DstSelected)
|
||||||
}
|
}
|
||||||
|
|
||||||
func PagesHandler(event *tcell.EventKey) *tcell.EventKey {
|
func PagesHandler(event *tcell.EventKey) *tcell.EventKey {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user