Moved containers into a separate package
This commit is contained in:
@@ -5,6 +5,7 @@ import "git.tebibyte.media/sashakoshka/tomo/theme"
|
||||
import "git.tebibyte.media/sashakoshka/tomo/layouts/basic"
|
||||
import "git.tebibyte.media/sashakoshka/tomo/elements/basic"
|
||||
import _ "git.tebibyte.media/sashakoshka/tomo/backends/all"
|
||||
import "git.tebibyte.media/sashakoshka/tomo/elements/containers"
|
||||
|
||||
func main () {
|
||||
tomo.Run(run)
|
||||
@@ -14,7 +15,7 @@ func run () {
|
||||
window, _ := tomo.NewWindow(360, 2)
|
||||
window.SetTitle("Icons")
|
||||
|
||||
container := basicElements.NewContainer(basicLayouts.Vertical { true, true })
|
||||
container := containers.NewContainer(basicLayouts.Vertical { true, true })
|
||||
window.Adopt(container)
|
||||
|
||||
container.Adopt(basicElements.NewLabel("Just some of the wonderful icons we have:", false), false)
|
||||
@@ -33,8 +34,8 @@ func run () {
|
||||
window.Show()
|
||||
}
|
||||
|
||||
func icons (min, max theme.Icon) (container *basicElements.Container) {
|
||||
container = basicElements.NewContainer(basicLayouts.Horizontal { true, false })
|
||||
func icons (min, max theme.Icon) (container *containers.Container) {
|
||||
container = containers.NewContainer(basicLayouts.Horizontal { true, false })
|
||||
for index := min; index <= max; index ++ {
|
||||
container.Adopt(basicElements.NewIcon(index, theme.IconSizeSmall), true)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user