From f10ef119190ccc60f5aaa26b050c469e770b6559 Mon Sep 17 00:00:00 2001 From: Reinhold Gschweicher Date: Mon, 30 Nov 2020 21:18:41 +0100 Subject: [PATCH] Use long press as right click on messages --- imports/NeoChat/Page/RoomPage.qml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/imports/NeoChat/Page/RoomPage.qml b/imports/NeoChat/Page/RoomPage.qml index bba8bd39b..97aa2d7da 100644 --- a/imports/NeoChat/Page/RoomPage.qml +++ b/imports/NeoChat/Page/RoomPage.qml @@ -255,9 +255,14 @@ Kirigami.ScrollablePage { Layout.fillWidth: true Layout.maximumWidth: messageListView.width mouseArea: MouseArea { - acceptedButtons: Qt.RightButton + acceptedButtons: Qt.LeftButton | Qt.RightButton anchors.fill: parent - onClicked: openMessageContext(author, display, eventId, toolTip); + onClicked: { + if (mouse.button == Qt.RightButton) { + openMessageContext(author, display, eventId, toolTip); + } + } + onPressAndHold: openMessageContext(author, display, eventId, toolTip); } onReplyClicked: goToEvent(eventID) onReplyToMessageClicked: replyToMessage(replyUser, replyContent, eventId);