[vlc-commits] qml: display contextual menu on Menu Key press for List/Grid items
    Pierre Lamot 
    git at videolan.org
       
    Mon Oct 14 11:59:29 CEST 2019
    
    
  
vlc | branch: master | Pierre Lamot <pierre at videolabs.io> | Thu Sep 26 11:02:03 2019 +0200| [c58f35b85c1bb9a434d750bb0dadd5cd03c3bd87] | committer: Jean-Baptiste Kempf
qml: display contextual menu on Menu Key press for List/Grid items
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c58f35b85c1bb9a434d750bb0dadd5cd03c3bd87
---
 modules/gui/qt/qml/utils/GridItem.qml | 2 ++
 modules/gui/qt/qml/utils/ListItem.qml | 2 ++
 2 files changed, 4 insertions(+)
diff --git a/modules/gui/qt/qml/utils/GridItem.qml b/modules/gui/qt/qml/utils/GridItem.qml
index 1cbb760989..dbf6d59eba 100644
--- a/modules/gui/qt/qml/utils/GridItem.qml
+++ b/modules/gui/qt/qml/utils/GridItem.qml
@@ -56,6 +56,8 @@ Rectangle {
 
     property int index: 0
 
+    Keys.onMenuPressed: root.contextMenuButtonClicked(cover_bg)
+
     Item {
         id: gridItem
         width: childrenRect.width
diff --git a/modules/gui/qt/qml/utils/ListItem.qml b/modules/gui/qt/qml/utils/ListItem.qml
index 3f9fe61804..72363d6771 100644
--- a/modules/gui/qt/qml/utils/ListItem.qml
+++ b/modules/gui/qt/qml/utils/ListItem.qml
@@ -42,6 +42,8 @@ NavigableFocusScope {
     property alias color: linerect.color
     property bool showContextButton: false
 
+    Keys.onMenuPressed: root.contextMenuButtonClicked(cover_bg)
+
     Component {
         id: actionAdd
         IconToolButton {
    
    
More information about the vlc-commits
mailing list