diff --git a/ui/dropdowns.go b/ui/dropdowns.go deleted file mode 100644 index 8da69ff..0000000 --- a/ui/dropdowns.go +++ /dev/null @@ -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 -} diff --git a/ui/inputfields.go b/ui/inputfields.go index 8bb925b..7d15cbf 100644 --- a/ui/inputfields.go +++ b/ui/inputfields.go @@ -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 } diff --git a/ui/textviews.go b/ui/textviews.go index acb4d91..8894273 100644 --- a/ui/textviews.go +++ b/ui/textviews.go @@ -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 } diff --git a/ui/treeviews.go b/ui/treeviews.go index 092be6e..073c95a 100644 --- a/ui/treeviews.go +++ b/ui/treeviews.go @@ -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 }