[vlc-commits] qml: fix VolumeWidget mute player with space key

Fatih Uzunoglu git at videolan.org
Mon Dec 7 10:08:44 UTC 2020


vlc | branch: master | Fatih Uzunoglu <fuzun54 at outlook.com> | Fri Dec  4 02:02:00 2020 +0300| [0f749399ebd3a7e9624d0c52499f59d137d975ef] | committer: Pierre Lamot

qml: fix VolumeWidget mute player with space key

Signed-off-by: Pierre Lamot <pierre at videolabs.io>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0f749399ebd3a7e9624d0c52499f59d137d975ef
---

 modules/gui/qt/player/qml/VolumeWidget.qml | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/modules/gui/qt/player/qml/VolumeWidget.qml b/modules/gui/qt/player/qml/VolumeWidget.qml
index 0a076fee65..33bef7669a 100644
--- a/modules/gui/qt/player/qml/VolumeWidget.qml
+++ b/modules/gui/qt/player/qml/VolumeWidget.qml
@@ -82,12 +82,15 @@ FocusScope{
 
             Accessible.name: i18n.qtr("Volume")
 
+            Keys.onPressed: {
+                if (KeyHelper.matchOk(event)) {
+                    event.accepted = true
+                }
+            }
+
             Keys.onReleased: {
-                if (event.accepted)
-                    return;
                 if (KeyHelper.matchOk(event)) {
                     player.muted = !player.muted
-                    event.accepted = true
                 }
             }
 



More information about the vlc-commits mailing list