mirror of
https://github.com/eeeXun/GTT.git
synced 2025-05-19 01:00:20 -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()
|
srcInput = tview.NewTextArea()
|
||||||
dstOutput = tview.NewTextView()
|
dstOutput = tview.NewTextView()
|
||||||
definitionOutput = tview.NewTextArea()
|
definitionOutput = tview.NewTextArea()
|
||||||
translateOutput = tview.NewTextArea()
|
partOutput = tview.NewTextArea()
|
||||||
srcLangDropDown = tview.NewDropDown()
|
srcLangDropDown = tview.NewDropDown()
|
||||||
dstLangDropDown = tview.NewDropDown()
|
dstLangDropDown = tview.NewDropDown()
|
||||||
langCycle = ui.NewUICycle(srcLangDropDown, dstLangDropDown)
|
langCycle = ui.NewUICycle(srcLangDropDown, dstLangDropDown)
|
||||||
|
14
ui.go
14
ui.go
@ -52,8 +52,8 @@ func updateBackgroundColor() {
|
|||||||
definitionOutput.SetTextStyle(tcell.StyleDefault.
|
definitionOutput.SetTextStyle(tcell.StyleDefault.
|
||||||
Background(style.BackgroundColor()).
|
Background(style.BackgroundColor()).
|
||||||
Foreground(style.ForegroundColor()))
|
Foreground(style.ForegroundColor()))
|
||||||
translateOutput.SetBackgroundColor(style.BackgroundColor())
|
partOutput.SetBackgroundColor(style.BackgroundColor())
|
||||||
translateOutput.SetTextStyle(tcell.StyleDefault.
|
partOutput.SetTextStyle(tcell.StyleDefault.
|
||||||
Background(style.BackgroundColor()).
|
Background(style.BackgroundColor()).
|
||||||
Foreground(style.ForegroundColor()))
|
Foreground(style.ForegroundColor()))
|
||||||
|
|
||||||
@ -113,7 +113,7 @@ func updateBorderColor() {
|
|||||||
SetTitleColor(style.DstBorderColor())
|
SetTitleColor(style.DstBorderColor())
|
||||||
definitionOutput.SetBorderColor(style.SrcBorderColor()).
|
definitionOutput.SetBorderColor(style.SrcBorderColor()).
|
||||||
SetTitleColor(style.SrcBorderColor())
|
SetTitleColor(style.SrcBorderColor())
|
||||||
translateOutput.SetBorderColor(style.DstBorderColor()).
|
partOutput.SetBorderColor(style.DstBorderColor()).
|
||||||
SetTitleColor(style.DstBorderColor())
|
SetTitleColor(style.DstBorderColor())
|
||||||
|
|
||||||
// dropdown
|
// dropdown
|
||||||
@ -136,7 +136,7 @@ func updateNonConfigColor() {
|
|||||||
definitionOutput.SetSelectedStyle(tcell.StyleDefault.
|
definitionOutput.SetSelectedStyle(tcell.StyleDefault.
|
||||||
Background(style.SelectedColor()).
|
Background(style.SelectedColor()).
|
||||||
Foreground(style.ForegroundColor()))
|
Foreground(style.ForegroundColor()))
|
||||||
translateOutput.SetSelectedStyle(tcell.StyleDefault.
|
partOutput.SetSelectedStyle(tcell.StyleDefault.
|
||||||
Background(style.SelectedColor()).
|
Background(style.SelectedColor()).
|
||||||
Foreground(style.ForegroundColor()))
|
Foreground(style.ForegroundColor()))
|
||||||
|
|
||||||
@ -220,8 +220,8 @@ func uiInit() {
|
|||||||
dstOutput.SetBorder(true)
|
dstOutput.SetBorder(true)
|
||||||
definitionOutput.SetBorder(true).
|
definitionOutput.SetBorder(true).
|
||||||
SetTitle("Definition")
|
SetTitle("Definition")
|
||||||
translateOutput.SetBorder(true).
|
partOutput.SetBorder(true).
|
||||||
SetTitle("Translation")
|
SetTitle("Part of speech")
|
||||||
|
|
||||||
// dropdown
|
// dropdown
|
||||||
srcLangDropDown.SetBorder(true)
|
srcLangDropDown.SetBorder(true)
|
||||||
@ -260,7 +260,7 @@ func uiInit() {
|
|||||||
0, 1, true).
|
0, 1, true).
|
||||||
AddItem(tview.NewFlex().SetDirection(tview.FlexRow).
|
AddItem(tview.NewFlex().SetDirection(tview.FlexRow).
|
||||||
AddItem(dstOutput, 0, 1, false).
|
AddItem(dstOutput, 0, 1, false).
|
||||||
AddItem(translateOutput, 0, 1, false),
|
AddItem(partOutput, 0, 1, false),
|
||||||
0, 1, false)
|
0, 1, false)
|
||||||
langWindow.SetDirection(tview.FlexRow).
|
langWindow.SetDirection(tview.FlexRow).
|
||||||
AddItem(nil, 0, 1, false).
|
AddItem(nil, 0, 1, false).
|
||||||
|
Loading…
x
Reference in New Issue
Block a user