1
0
Fork 0
mirror of https://github.com/postmannen/ctrl.git synced 2024-12-14 12:37:31 +00:00

fixed the initial pages error

This commit is contained in:
postmannen 2021-06-30 11:05:10 +02:00
parent acc702d1cb
commit 34df91eaf2

View file

@ -48,21 +48,23 @@ func (s *Stew) Start() error {
return event
})
//info := tview.NewTextView().
// SetDynamicColors(true).
// SetRegions(true).
// SetWrap(false)
info := tview.NewTextView().
SetDynamicColors(true).
SetRegions(true).
SetWrap(false)
fmt.Fprintf(info, "apekatt")
slide := messageSlide(app)
pages.AddPage("message", slide, true, true)
// Create the main layout.
layout := tview.NewFlex().
SetDirection(tview.FlexRow).
AddItem(pages, 0, 1, true).
//AddItem(info, 1, 1, false).
SetBorder(true)
layout := tview.NewFlex()
layout.SetBorder(true)
layout.SetDirection(tview.FlexRow).
AddItem(pages, 0, 10, true).
AddItem(info, 1, 1, false)
if err := app.SetRoot(layout, true).EnableMouse(true).Run(); err != nil {
panic(err)