summaryrefslogtreecommitdiff
path: root/modules/notifications
diff options
context:
space:
mode:
Diffstat (limited to 'modules/notifications')
-rw-r--r--modules/notifications/Notification.qml12
1 files changed, 9 insertions, 3 deletions
diff --git a/modules/notifications/Notification.qml b/modules/notifications/Notification.qml
index 76e75f8..a02210e 100644
--- a/modules/notifications/Notification.qml
+++ b/modules/notifications/Notification.qml
@@ -30,14 +30,20 @@ StyledRect {
anchors.fill: parent
hoverEnabled: true
preventStealing: true
+ cursorShape: pressed ? Qt.ClosedHandCursor : undefined
+ acceptedButtons: Qt.LeftButton | Qt.MiddleButton
- onEntered: root.modelData.timer.stop()
- onExited: root.modelData.timer.start()
+ onEntered: root.modelData?.timer.stop()
+ onExited: root.modelData?.timer.start()
drag.target: parent
drag.axis: Drag.XAxis
- onPressed: event => startY = event.y
+ onPressed: event => {
+ startY = event.y;
+ if (event.button === Qt.MiddleButton)
+ root.modelData.notification.dismiss();
+ }
onReleased: event => {
if (Math.abs(root.x) < NotifsConfig.sizes.width * NotifsConfig.clearThreshold)
root.x = 0;