From 253fb6857877d1b4fdea6776e7f91baeec675e13 Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Sat, 10 May 2025 23:36:07 +1000 Subject: notifs: optional action on click --- config/NotifsConfig.qml | 1 + modules/notifications/Notification.qml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/config/NotifsConfig.qml b/config/NotifsConfig.qml index a899cf3..10d0a4f 100644 --- a/config/NotifsConfig.qml +++ b/config/NotifsConfig.qml @@ -8,6 +8,7 @@ Singleton { readonly property int defaultExpireTimeout: 3000 readonly property real clearThreshold: 0.3 readonly property int expandThreshold: 20 + readonly property bool actionOnClick: false readonly property Sizes sizes: Sizes {} component Sizes: QtObject { diff --git a/modules/notifications/Notification.qml b/modules/notifications/Notification.qml index 11acf1c..cb067f9 100644 --- a/modules/notifications/Notification.qml +++ b/modules/notifications/Notification.qml @@ -59,7 +59,7 @@ StyledRect { } } onClicked: event => { - if (event.button !== Qt.LeftButton) + if (!NotifsConfig.actionOnClick || event.button !== Qt.LeftButton) return; const actions = root.modelData.actions; -- cgit v1.2.3-freya