[6fc8f95bc6465849249d974d53eecc56c00ffda0fc3c7024bfa5b8e4d794b072/gnome-3-36] status: Pass scroll events to volume and brightness sliders



commit 96699b996cee405fc9725ae6787ece748b3a0b47
Author: Peter Simonyi <pts petersimonyi ca>
Date:   Sat May 16 09:04:32 2020 -0400

    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

 js/ui/status/brightness.js | 4 +++-
 js/ui/status/volume.js     | 3 +++
 2 files changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/js/ui/status/brightness.js b/js/ui/status/brightness.js
index 2d0fee49a3..17247880f5 100644
--- a/js/ui/status/brightness.js
+++ b/js/ui/status/brightness.js
@@ -48,7 +48,9 @@ class Indicator extends PanelMenu.SystemIndicator {
         this._item.connect('key-press-event', (actor, event) => {
             return this._slider.emit('key-press-event', event);
         });
-
+        this._item.connect('scroll-event', (actor, event) => {
+            return this._slider.emit('scroll-event', event);
+        });
     }
 
     _sliderChanged() {
diff --git a/js/ui/status/volume.js b/js/ui/status/volume.js
index e8a787c4de..64767b8484 100644
--- a/js/ui/status/volume.js
+++ b/js/ui/status/volume.js
@@ -56,6 +56,9 @@ var StreamSlider = class {
         this.item.connect('key-press-event', (actor, 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._volumeCancellable = null;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]