feat(ui): set Box.titleAlign to left
This commit is contained in:
parent
5ced86076f
commit
0c47002c9e
4 changed files with 6 additions and 24 deletions
|
|
@ -1,20 +0,0 @@
|
|||
package ui
|
||||
|
||||
import (
|
||||
"github.com/gdamore/tcell/v2"
|
||||
"github.com/rigormorrtiss/discordo/util"
|
||||
"github.com/rivo/tview"
|
||||
)
|
||||
|
||||
func NewGuildsDropDown(onGuildsDropDownSelected func(string, int), theme *util.Theme) (d *tview.DropDown) {
|
||||
d = tview.NewDropDown()
|
||||
d.
|
||||
SetLabel("Guild: ").
|
||||
SetSelectedFunc(onGuildsDropDownSelected).
|
||||
SetFieldBackgroundColor(tcell.GetColor(theme.DropDownBackground)).
|
||||
SetBackgroundColor(tcell.GetColor(theme.DropDownBackground)).
|
||||
SetBorder(true).
|
||||
SetBorderPadding(0, 0, 1, 1)
|
||||
|
||||
return
|
||||
}
|
||||
|
|
@ -13,9 +13,9 @@ func NewMessageInputField(onMessageInputFieldInputCapture func(*tcell.EventKey)
|
|||
SetPlaceholderTextColor(tcell.ColorWhite).
|
||||
SetFieldBackgroundColor(tcell.GetColor(theme.InputFieldBackground)).
|
||||
SetBackgroundColor(tcell.GetColor(theme.InputFieldBackground)).
|
||||
SetInputCapture(onMessageInputFieldInputCapture).
|
||||
SetBorder(true).
|
||||
SetBorderPadding(0, 0, 1, 1).
|
||||
SetInputCapture(onMessageInputFieldInputCapture)
|
||||
SetBorderPadding(0, 0, 1, 1)
|
||||
|
||||
return
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,7 +17,8 @@ func NewMessagesTextView(app *tview.Application, theme *util.Theme) (textV *tvie
|
|||
}).
|
||||
SetBackgroundColor(tcell.GetColor(theme.TextViewBackground)).
|
||||
SetBorder(true).
|
||||
SetBorderPadding(0, 0, 1, 1)
|
||||
SetBorderPadding(0, 0, 1, 1).
|
||||
SetTitleAlign(tview.AlignLeft)
|
||||
|
||||
return
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,7 +17,8 @@ func NewGuildsTreeView(onGuildsTreeViewSelected func(*tview.TreeNode), theme *ut
|
|||
SetBackgroundColor(tcell.GetColor(theme.TreeViewBackground)).
|
||||
SetTitle("Guilds").
|
||||
SetBorder(true).
|
||||
SetBorderPadding(0, 0, 1, 1)
|
||||
SetBorderPadding(0, 0, 1, 1).
|
||||
SetTitleAlign(tview.AlignLeft)
|
||||
|
||||
return
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue