summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Rosca <[email protected]>2017-02-25 12:10:17 +0100
committerDavid Rosca <[email protected]>2017-02-25 12:16:05 +0100
commitb0436c547873f48f22f447507b75e6f589df3725 (patch)
tree35caec15359e24df22ef8753190ff95c9373c799
parent9b2d766b2bb41a6725b585eaa8ca11fc9cf36b36 (diff)
Quicklaunch: Open context menu on mouse press
Differential Revision: https://phabricator.kde.org/D4782
-rw-r--r--applets/quicklaunch/package/contents/ui/IconItem.qml10
1 files changed, 7 insertions, 3 deletions
diff --git a/applets/quicklaunch/package/contents/ui/IconItem.qml b/applets/quicklaunch/package/contents/ui/IconItem.qml
index fc0eb98..f2ff7c7 100644
--- a/applets/quicklaunch/package/contents/ui/IconItem.qml
+++ b/applets/quicklaunch/package/contents/ui/IconItem.qml
@@ -70,12 +70,16 @@ Item {
hoverEnabled: true
acceptedButtons: Qt.LeftButton | Qt.RightButton
+ onPressed: {
+ if (mouse.button == Qt.RightButton) {
+ contextMenu.refreshActions();
+ contextMenu.open(mouse.x, mouse.y);
+ }
+ }
+
onClicked: {
if (mouse.button == Qt.LeftButton) {
logic.openUrl(url)
- } else if (mouse.button == Qt.RightButton) {
- contextMenu.refreshActions();
- contextMenu.open(mouse.x, mouse.y);
}
}