[vlc-devel] [PATCH 31/49] qml: display contextual menu on Menu Key press for List/Grid items
Pierre Lamot
pierre at videolabs.io
Fri Oct 11 15:17:55 CEST 2019
---
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 {
--
2.20.1
More information about the vlc-devel
mailing list