Make expand work properly on ScrollableVBox

This commit is contained in:
luk3yx 2022-10-09 19:54:34 +13:00
parent 43c2fc0f78
commit fa574dcf41

View File

@ -854,6 +854,7 @@ function gui.ScrollableVBox(def)
local scrollbar_name = "_scrollbar-" .. assert(
def.name, "Please provide a name for all ScrollableVBox elements!"
)
local align_h, align_v, expand = def.align_h, def.align_v, def.expand
def.type = "vbox"
def.x, def.y = 0, 0
@ -864,6 +865,9 @@ function gui.ScrollableVBox(def)
h = h or min(inner_h, 5)
return gui.HBox {
align_h = align_h,
align_v = align_v,
expand = expand,
{
type = "scroll_container",
expand = true,