From f3d1d15b6186de996018fc4e6e7dc13658a706f4 Mon Sep 17 00:00:00 2001 From: LemmyCook Date: Fri, 5 Sep 2025 13:34:31 -0400 Subject: [PATCH] NPill: added support for middle mouse button --- Widgets/NPill.qml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Widgets/NPill.qml b/Widgets/NPill.qml index 1be58c4..1fcccfc 100644 --- a/Widgets/NPill.qml +++ b/Widgets/NPill.qml @@ -29,6 +29,7 @@ Item { signal exited signal clicked signal rightClicked + signal middleClicked signal wheel(int delta) // Internal state @@ -207,7 +208,7 @@ Item { MouseArea { anchors.fill: parent hoverEnabled: true - acceptedButtons: Qt.LeftButton | Qt.RightButton + acceptedButtons: Qt.LeftButton | Qt.RightButton | Qt.MiddleButton onEntered: { root.entered() tooltip.show() @@ -231,6 +232,9 @@ Item { } else if (mouse.button === Qt.RightButton) { root.rightClicked() } + else if (mouse.button === Qt.MiddleButton) { + root.middleClicked() + } } onWheel: wheel => { root.wheel(wheel.angleDelta.y)