summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Edmundson <[email protected]>2017-04-28 15:47:53 +0100
committerDavid Edmundson <[email protected]>2017-05-02 18:00:20 +0100
commit199f5d99aef2490779cde5fc5bc4f75eeea75d6c (patch)
treeebe5a50b0ec6141d038c19495bb07f715dcf4ae0
parent619238ab442410e9c8ceecf35d989ec8b28d4065 (diff)
Show applet context menu when right clicking on Applet tab in gropuing applet
Test Plan: Right clicked on an applet. Used that menu Reviewers: #plasma Subscribers: plasma-devel Tags: #plasma Differential Revision: https://phabricator.kde.org/D5641
-rw-r--r--applets/grouping/package/contents/ui/main.qml10
1 files changed, 10 insertions, 0 deletions
diff --git a/applets/grouping/package/contents/ui/main.qml b/applets/grouping/package/contents/ui/main.qml
index 315e7a0..aab7af8 100644
--- a/applets/grouping/package/contents/ui/main.qml
+++ b/applets/grouping/package/contents/ui/main.qml
@@ -87,8 +87,18 @@ Item {
Repeater {
model: mainStack.children
+ //attached properties:
+ // model == a QQmlDMObjectData wrapper round the PlasmoidItem
+ // modelData == the PlasmoidItem instance
PlasmaComponents.TabButton {
text: model.text
+ MouseArea {
+ acceptedButtons: Qt.RightButton
+ anchors.fill: parent
+ onClicked: {
+ modelData.clicked(mouse);
+ }
+ }
}
}
//hack: PlasmaComponents.TabBar is being weird with heights. Probably a bug