Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: we can open menu by touchscreen #330

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion panels/dock/package/main.qml
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,8 @@ Window {
}
}

TapHandler {
// TOFIX: cannot receive tapped signal by long pressing on touch screen
/* TapHandler {
acceptedButtons: Qt.LeftButton | Qt.RightButton
gesturePolicy: TapHandler.WithinBounds
onTapped: function(eventPoint, button) {
Expand All @@ -241,6 +242,21 @@ Window {
}
}
}
*/

MouseArea {
anchors.fill: parent
acceptedButtons: Qt.RightButton

onPressed: {
let lastActive = MenuHelper.activeMenu
MenuHelper.closeCurrent()
dockMenuLoader.active = true
if (lastActive !== dockMenuLoader.item) {
MenuHelper.openMenu(dockMenuLoader.item)
}
}
}

HoverHandler {
cursorShape: Qt.ArrowCursor
Expand Down
Loading