notifications: middle click to dismiss

This commit is contained in:
end-4
2025-05-26 00:09:09 +02:00
parent a6e3f20dc8
commit ce9993071c
2 changed files with 12 additions and 5 deletions
@@ -61,10 +61,16 @@ Item { // Notification item area
DragManager { // Drag manager
id: dragManager
anchors.fill: root
anchors.leftMargin: -notificationIcon.implicitWidth
anchors.leftMargin: root.expanded ? -notificationIcon.implicitWidth : 0
interactive: expanded
automaticallyReset: false
acceptedButtons: Qt.LeftButton
acceptedButtons: Qt.LeftButton | Qt.MiddleButton
onClicked: (mouse) => {
if (mouse.button === Qt.MiddleButton) {
root.destroyWithAnimation();
}
}
onPressAndHold: (mouse) => {
if (mouse.button === Qt.LeftButton) {