diff --git a/examples/goroutines/main.go b/examples/goroutines/main.go index 4d2a8f0..1354e48 100644 --- a/examples/goroutines/main.go +++ b/examples/goroutines/main.go @@ -4,6 +4,7 @@ import "os" import "time" import "git.tebibyte.media/sashakoshka/tomo" import "git.tebibyte.media/sashakoshka/tomo/elements/basic" +import "git.tebibyte.media/sashakoshka/tomo/elements/layouts" import _ "git.tebibyte.media/sashakoshka/tomo/backends/x" func main () { @@ -14,8 +15,10 @@ func main () { func run () { window, _ := tomo.NewWindow(2, 2) window.SetTitle("clock") + container := basic.NewContainer(layouts.Vertical { true, true }) + window.Adopt(container) label := basic.NewLabel(formatTime(), false) - window.Adopt(label) + container.Adopt(label, false) window.OnClose(tomo.Stop) window.Show() go tick(label)