From 996c00b04cd860e8bcaef34336e752975f56efb6 Mon Sep 17 00:00:00 2001 From: Aylur Date: Sun, 14 Jul 2024 13:51:25 +0200 Subject: fix(slider) * remove custom css selector, so that default gtk theme works * set max to 1 by default --- src/widget/slider.vala | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/widget/slider.vala') diff --git a/src/widget/slider.vala b/src/widget/slider.vala index 4c6cb88..e41e2e8 100644 --- a/src/widget/slider.vala +++ b/src/widget/slider.vala @@ -6,14 +6,14 @@ public class Slider : Gtk.Scale { set { orientation = value ? Gtk.Orientation.VERTICAL : Gtk.Orientation.HORIZONTAL; } } - static construct { - set_css_name("slider"); - } - construct { if (adjustment == null) adjustment = new Gtk.Adjustment(0,0,0,0,0,0); + if (max == 0 && min == 0) { + max = 1; + } + notify["orientation"].connect(() => { notify_property("vertical"); }); -- cgit v1.2.3