status/backlight: Notify slider value changes

The custom setter used by the slider item isn't emitting change
notifications, so the property binding that uses it as source
never propagates the new value.

Fix this by emitting proper change notifications.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2856>
This commit is contained in:
Florian Müllner 2023-08-02 18:09:46 +02:00 committed by Marge Bot
parent 3c175bce05
commit 7c4b1d4ae6

View File

@ -44,9 +44,14 @@ const SliderItem = GObject.registerClass({
}
set value(value) {
if (this.value === value)
return;
this._slider.block_signal_handler(this._sliderChangedId);
this._slider.value = value / 100;
this._slider.unblock_signal_handler(this._sliderChangedId);
this.notify('value');
}
});