status: Pass scroll events to volume and brightness sliders

Sliders can be operated by mouse scroll, but the mouse has to be over
the slider control.  Make the brightness and volume system menu entries
forward scroll events to the sliders they contain so that scrolling
anywhere on the menu item operates the slider.

Closes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2795
This commit is contained in:
Peter Simonyi 2020-05-16 09:04:32 -04:00 committed by Florian Müllner
parent 390431c5e0
commit 96699b996c
2 changed files with 6 additions and 1 deletions

View File

@ -48,7 +48,9 @@ class Indicator extends PanelMenu.SystemIndicator {
this._item.connect('key-press-event', (actor, event) => { this._item.connect('key-press-event', (actor, event) => {
return this._slider.emit('key-press-event', event); return this._slider.emit('key-press-event', event);
}); });
this._item.connect('scroll-event', (actor, event) => {
return this._slider.emit('scroll-event', event);
});
} }
_sliderChanged() { _sliderChanged() {

View File

@ -56,6 +56,9 @@ var StreamSlider = class {
this.item.connect('key-press-event', (actor, event) => { this.item.connect('key-press-event', (actor, event) => {
return this._slider.emit('key-press-event', event); return this._slider.emit('key-press-event', event);
}); });
this.item.connect('scroll-event', (actor, event) => {
return this._slider.emit('scroll-event', event);
});
this._stream = null; this._stream = null;
this._volumeCancellable = null; this._volumeCancellable = null;