add: stack widget

This commit is contained in:
Aylur
2024-09-11 22:39:15 +00:00
parent 137345755c
commit d203255ec2
8 changed files with 51 additions and 7 deletions
+4 -2
View File
@@ -62,9 +62,11 @@ local function set_children(parent, children)
end
end
-- FIXME: add rest of the edge cases like Stack
-- TODO: add more container types
if Astal.Box:is_type_of(parent) then
parent:set_children(children)
elseif Astal.Stack:is_type_of(parent) then
parent:set_children(children)
elseif Astal.CenterBox:is_type_of(parent) then
parent.start_widget = children[1]
parent.center_widget = children[2]
@@ -223,7 +225,7 @@ local Widget = {
Revealer = astalify(Gtk.Revealer),
Scrollable = astalify(Astal.Scrollable),
Slider = astalify(Astal.Slider),
-- TODO: Stack
Stack = astalify(Astal.Stack),
Switch = astalify(Gtk.Switch),
Window = astalify(Astal.Window),
}