Fix ScrollContainer layout

This commit is contained in:
Sasha Koshka 2024-07-26 17:54:32 -04:00
parent 18b8898644
commit 3e382da688

View File

@ -73,7 +73,11 @@ func NewScrollContainer (sides ScrollSide) *ScrollContainer {
this.OnKeyUp(this.handleKeyUp)
this.SetRole(tomo.R("objects", "ScrollContainer"))
this.SetTag(sides.String(), true)
this.SetAttr(tomo.ALayout(layouts.NewGrid(true, false)(true, false)))
if sides == ScrollVertical {
this.SetAttr(tomo.ALayout(layouts.NewGrid(true)(true, false)))
} else {
this.SetAttr(tomo.ALayout(layouts.NewGrid(true, false)(true, false)))
}
return this
}