summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAylur <[email protected]>2024-07-14 13:51:25 +0200
committerAylur <[email protected]>2024-07-14 13:51:25 +0200
commit996c00b04cd860e8bcaef34336e752975f56efb6 (patch)
tree9be2b1075672c47fa0fdaa085e26354b091356ba
parent017b9ba1acdd99b02bd8eba26d243b7b2a73a044 (diff)
fix(slider)
* remove custom css selector, so that default gtk theme works * set max to 1 by default
-rw-r--r--src/widget/slider.vala8
1 files changed, 4 insertions, 4 deletions
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");
});