mirror of
https://github.com/eeeXun/GTT.git
synced 2025-05-18 16:50:14 -07:00
rename translate to part of speech
This commit is contained in:
parent
3f4013eb54
commit
079b40cfcb
2
main.go
2
main.go
@ -17,7 +17,7 @@ var (
|
||||
srcInput = tview.NewTextArea()
|
||||
dstOutput = tview.NewTextView()
|
||||
definitionOutput = tview.NewTextArea()
|
||||
translateOutput = tview.NewTextArea()
|
||||
partOutput = tview.NewTextArea()
|
||||
srcLangDropDown = tview.NewDropDown()
|
||||
dstLangDropDown = tview.NewDropDown()
|
||||
langCycle = ui.NewUICycle(srcLangDropDown, dstLangDropDown)
|
||||
|
14
ui.go
14
ui.go
@ -52,8 +52,8 @@ func updateBackgroundColor() {
|
||||
definitionOutput.SetTextStyle(tcell.StyleDefault.
|
||||
Background(style.BackgroundColor()).
|
||||
Foreground(style.ForegroundColor()))
|
||||
translateOutput.SetBackgroundColor(style.BackgroundColor())
|
||||
translateOutput.SetTextStyle(tcell.StyleDefault.
|
||||
partOutput.SetBackgroundColor(style.BackgroundColor())
|
||||
partOutput.SetTextStyle(tcell.StyleDefault.
|
||||
Background(style.BackgroundColor()).
|
||||
Foreground(style.ForegroundColor()))
|
||||
|
||||
@ -113,7 +113,7 @@ func updateBorderColor() {
|
||||
SetTitleColor(style.DstBorderColor())
|
||||
definitionOutput.SetBorderColor(style.SrcBorderColor()).
|
||||
SetTitleColor(style.SrcBorderColor())
|
||||
translateOutput.SetBorderColor(style.DstBorderColor()).
|
||||
partOutput.SetBorderColor(style.DstBorderColor()).
|
||||
SetTitleColor(style.DstBorderColor())
|
||||
|
||||
// dropdown
|
||||
@ -136,7 +136,7 @@ func updateNonConfigColor() {
|
||||
definitionOutput.SetSelectedStyle(tcell.StyleDefault.
|
||||
Background(style.SelectedColor()).
|
||||
Foreground(style.ForegroundColor()))
|
||||
translateOutput.SetSelectedStyle(tcell.StyleDefault.
|
||||
partOutput.SetSelectedStyle(tcell.StyleDefault.
|
||||
Background(style.SelectedColor()).
|
||||
Foreground(style.ForegroundColor()))
|
||||
|
||||
@ -220,8 +220,8 @@ func uiInit() {
|
||||
dstOutput.SetBorder(true)
|
||||
definitionOutput.SetBorder(true).
|
||||
SetTitle("Definition")
|
||||
translateOutput.SetBorder(true).
|
||||
SetTitle("Translation")
|
||||
partOutput.SetBorder(true).
|
||||
SetTitle("Part of speech")
|
||||
|
||||
// dropdown
|
||||
srcLangDropDown.SetBorder(true)
|
||||
@ -260,7 +260,7 @@ func uiInit() {
|
||||
0, 1, true).
|
||||
AddItem(tview.NewFlex().SetDirection(tview.FlexRow).
|
||||
AddItem(dstOutput, 0, 1, false).
|
||||
AddItem(translateOutput, 0, 1, false),
|
||||
AddItem(partOutput, 0, 1, false),
|
||||
0, 1, false)
|
||||
langWindow.SetDirection(tview.FlexRow).
|
||||
AddItem(nil, 0, 1, false).
|
||||
|
Loading…
x
Reference in New Issue
Block a user