From f00e558c6af391bc7ae0b64190da37f876f12c79 Mon Sep 17 00:00:00 2001 From: Aylur Date: Wed, 25 Dec 2024 02:36:28 +0100 Subject: docs: add gtk4 jsx documentation --- lib/astal/gtk4/src/widget/box.vala | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'lib/astal/gtk4/src') 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 [property@Gtk.Orientable :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 children { set { foreach (var child in children) { -- cgit v1.2.3