systray: show a the context menu upon press an hold on the icon

Summary: This way we can open the context menu from touch

Test Plan: Tapped and hold on my screen

Reviewers: #plasma, ngraham

Reviewed By: ngraham

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D19946
wilder-5.19
Aleix Pol 7 years ago
parent 8ef6104a2d
commit 890e91b29b
  1. 3
      applets/systemtray/package/contents/ui/items/AbstractItem.qml
  2. 4
      applets/systemtray/package/contents/ui/items/StatusNotifierItem.qml

@ -112,6 +112,9 @@ PlasmaCore.ToolTipArea {
abstractItem.contextMenu(mouse)
}
}
onPressAndHold: {
abstractItem.contextMenu(mouse)
}
onWheel: {
abstractItem.wheel(wheel);
//Don't accept the event in order to make the scrolling by mouse wheel working

@ -59,6 +59,10 @@ AbstractItem {
}
}
onContextMenu: {
openContextMenu(plasmoid.nativeInterface.popupPosition(taskIcon, mouse.x, mouse.y))
}
onClicked: {
var pos = plasmoid.nativeInterface.popupPosition(taskIcon, mouse.x, mouse.y);

Loading…
Cancel
Save