summaryrefslogtreecommitdiff
path: root/src/widget/levelbar.vala
diff options
context:
space:
mode:
authorAylur <[email protected]>2024-06-05 13:16:28 +0200
committerAylur <[email protected]>2024-06-05 13:16:28 +0200
commite675e9784a20bb07d33f0feb3724a2a1f072f52b (patch)
treee9593e13571b6ec1fab8462721e61f34eee924ff /src/widget/levelbar.vala
parentca74fb7ad016f9ceee3756a973baa2d87a8aa1d6 (diff)
more widget subclasses
* levelbar * overlay * scrollable * slider
Diffstat (limited to 'src/widget/levelbar.vala')
-rw-r--r--src/widget/levelbar.vala15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/widget/levelbar.vala b/src/widget/levelbar.vala
new file mode 100644
index 0000000..1db2cc7
--- /dev/null
+++ b/src/widget/levelbar.vala
@@ -0,0 +1,15 @@
+namespace Astal {
+public class LevelBar : Gtk.LevelBar {
+ [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");
+ });
+ }
+}
+}