From cd99371a891d8fdc88b327eadb0050c66b0567d2 Mon Sep 17 00:00:00 2001 From: Damocles Date: Fri, 17 Apr 2026 11:29:50 +0200 Subject: [PATCH 1/2] actions in center don't auto-dismiss, only invoke --- modules/NotifCard.qml | 7 +++++-- modules/NotifCenter.qml | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/NotifCard.qml b/modules/NotifCard.qml index eb77208..b6753dd 100644 --- a/modules/NotifCard.qml +++ b/modules/NotifCard.qml @@ -11,6 +11,7 @@ Item { required property var notif // NotifItem (may be null — all accesses use ?.) property bool showAppName: true + property bool dismissOnAction: true property int iconSize: 32 property int bodyMaxLines: 3 property color accentColor: M.Theme.base0D @@ -138,7 +139,8 @@ Item { const def = root.notif?.actions?.find(a => a.identifier === "default"); if (def) { def.invoke(); - root.dismissRequested(); + if (root.dismissOnAction) + root.dismissRequested(); } } } @@ -257,7 +259,8 @@ Item { cursorShape: Qt.PointingHandCursor onTapped: { parent.modelData.invoke(); - M.NotifService.dismiss(root.notif.id); + if (root.dismissOnAction) + root.dismissRequested(); } } } diff --git a/modules/NotifCenter.qml b/modules/NotifCenter.qml index 40c21a3..4e93f9f 100644 --- a/modules/NotifCenter.qml +++ b/modules/NotifCenter.qml @@ -418,6 +418,7 @@ M.HoverPanel { anchors.leftMargin: 8 notif: notifDelegate._notif showAppName: false + dismissOnAction: false iconSize: 24 bodyMaxLines: 2 onDismissRequested: notifDelegate.dismiss() From 1c67f002f42439fffd22c928ccfdd8ce1197ff7e Mon Sep 17 00:00:00 2001 From: Damocles Date: Fri, 17 Apr 2026 11:31:09 +0200 Subject: [PATCH 2/2] right-click notification to dismiss --- modules/NotifCard.qml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/NotifCard.qml b/modules/NotifCard.qml index b6753dd..505ae0b 100644 --- a/modules/NotifCard.qml +++ b/modules/NotifCard.qml @@ -25,6 +25,12 @@ Item { id: _hover } + TapHandler { + acceptedButtons: Qt.RightButton + cursorShape: Qt.PointingHandCursor + onTapped: root.dismissRequested() + } + // Background: base01, base02 on hover Rectangle { anchors.fill: parent