This commit is contained in:
Tulir Asokan 2018-04-01 10:28:46 +03:00
parent 1e082f9715
commit 2ba2fde396
3 changed files with 6 additions and 6 deletions

View File

@ -26,9 +26,9 @@ func Center(width, height int, p tview.Primitive) tview.Primitive {
return tview.NewFlex(). return tview.NewFlex().
AddItem(tview.NewBox(), 0, 1, false). AddItem(tview.NewBox(), 0, 1, false).
AddItem(tview.NewFlex(). AddItem(tview.NewFlex().
SetDirection(tview.FlexRow). SetDirection(tview.FlexRow).
AddItem(tview.NewBox(), 0, 1, false). AddItem(tview.NewBox(), 0, 1, false).
AddItem(p, height, 1, true). AddItem(p, height, 1, true).
AddItem(tview.NewBox(), 0, 1, false), width, 1, true). AddItem(tview.NewBox(), 0, 1, false), width, 1, true).
AddItem(tview.NewBox(), 0, 1, false) AddItem(tview.NewBox(), 0, 1, false)
} }

View File

@ -30,7 +30,7 @@ var colorNames []string
func init() { func init() {
colorNames = make([]string, len(tcell.ColorNames)) colorNames = make([]string, len(tcell.ColorNames))
i := 0 i := 0
for name, _ := range tcell.ColorNames { for name := range tcell.ColorNames {
colorNames[i] = name colorNames[i] = name
i++ i++
} }

View File

@ -130,7 +130,7 @@ func (view *MessageView) updateWidestSender(sender string) {
type MessageDirection int type MessageDirection int
const ( const (
AppendMessage MessageDirection = iota AppendMessage MessageDirection = iota
PrependMessage PrependMessage
IgnoreMessage IgnoreMessage
) )