diff --git a/src/Widgets/ScreenBrightness.vala b/src/Widgets/ScreenBrightness.vala index 08c4051c..3ea57b4f 100644 --- a/src/Widgets/ScreenBrightness.vala +++ b/src/Widgets/ScreenBrightness.vala @@ -64,13 +64,17 @@ public class Power.Widgets.ScreenBrightness : Gtk.EventBox { }); brightness_slider.value_changed.connect ((value) => { - brightness_slider.set_value (value.get_value ()); - dm.brightness = (int) value.get_value (); + var brightness = value.get_value (); + if (brightness > 0) { + brightness_slider.set_value (brightness); + dm.brightness = (int) brightness; + } }); - dm.brightness_changed.connect ((brightness) => { - brightness_slider.set_value ((double)brightness); + if (brightness > 0) { + brightness_slider.set_value ((double)brightness); + } }); }