diff options
Diffstat (limited to 'lib/astal/gtk4/src/widget/box.vala')
-rw-r--r-- | lib/astal/gtk4/src/widget/box.vala | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/astal/gtk4/src/widget/box.vala b/lib/astal/gtk4/src/widget/box.vala index eb52f9c..28f2b00 100644 --- a/lib/astal/gtk4/src/widget/box.vala +++ b/lib/astal/gtk4/src/widget/box.vala @@ -1,4 +1,19 @@ public class Astal.Box : Gtk.Box { + /** + * Corresponds to [[email protected] :orientation]. + */ + [CCode (notify = false)] + public bool vertical { + get { return orientation == Gtk.Orientation.VERTICAL; } + set { orientation = value ? Gtk.Orientation.VERTICAL : Gtk.Orientation.HORIZONTAL; } + } + + construct { + notify["orientation"].connect(() => { + notify_property("vertical"); + }); + } + public List<weak Gtk.Widget> children { set { foreach (var child in children) { |