[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [declarative-plasmoids] tasks/package/contents/ui: open contextmenu only on right button click
From:       Shaun Reich <shaun.reich () kdemail ! net>
Date:       2012-02-10 16:11:56
Message-ID: 20120210161156.92071A60D3 () git ! kde ! org
[Download RAW message or body]

Git commit 3dcdecdf2d67a0e15a113e10eb5863b8d25e8341 by Shaun Reich.
Committed on 10/02/2012 at 16:12.
Pushed by sreich into branch 'master'.

open contextmenu only on right button click

M  +4    -0    tasks/package/contents/ui/main.qml

http://commits.kde.org/declarative-plasmoids/3dcdecdf2d67a0e15a113e10eb5863b8d25e8341

diff --git a/tasks/package/contents/ui/main.qml b/tasks/package/contents/ui/main.qml
index d08f1bb..55a8e9d 100644
--- a/tasks/package/contents/ui/main.qml
+++ b/tasks/package/contents/ui/main.qml
@@ -138,10 +138,14 @@ Item {
                 anchors.fill: parent
                 hoverEnabled: true
 
+                acceptedButtons: Qt.LeftButton | Qt.RightButton
+
                 onClicked: {
                    // if (!contextMenu) {
+                    if (mouse.button == Qt.RightButton) {
                         contextMenu = contextMenuComponent.createObject(wrapper)
                         contextMenu.open()
+                    }
                    // }
                 }
 

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic