[vlc-devel] [PATCH 25/27] qml: fix VolumeWidget mute player with space key

Fatih Uzunoglu fuzun54 at outlook.com
Fri Dec 4 00:02:00 CET 2020


---
 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
                 }
             }
 
-- 
2.27.0



More information about the vlc-devel mailing list