From ae67668fc277531b6eb23e67b0547ac1250023f3 Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Sat, 10 May 2025 21:22:40 +1000 Subject: notifs: option to have expire timeout Also remove scrollbar and reduce expand drag threshold --- config/NotifsConfig.qml | 3 ++- modules/notifications/Content.qml | 3 --- services/Notifs.qml | 5 ++++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/config/NotifsConfig.qml b/config/NotifsConfig.qml index 66949f3..a899cf3 100644 --- a/config/NotifsConfig.qml +++ b/config/NotifsConfig.qml @@ -4,9 +4,10 @@ import Quickshell import QtQuick Singleton { + readonly property bool expire: false readonly property int defaultExpireTimeout: 3000 readonly property real clearThreshold: 0.3 - readonly property int expandThreshold: 30 + readonly property int expandThreshold: 20 readonly property Sizes sizes: Sizes {} component Sizes: QtObject { diff --git a/modules/notifications/Content.qml b/modules/notifications/Content.qml index 122da00..75fcb31 100644 --- a/modules/notifications/Content.qml +++ b/modules/notifications/Content.qml @@ -3,7 +3,6 @@ import "root:/services" import "root:/config" import Quickshell import QtQuick -import QtQuick.Controls Item { id: root @@ -41,8 +40,6 @@ Item { delegate: Notification {} - ScrollBar.vertical: StyledScrollBar {} - add: Transition { Anim { property: "x" diff --git a/services/Notifs.qml b/services/Notifs.qml index 7697d9e..44db1c5 100644 --- a/services/Notifs.qml +++ b/services/Notifs.qml @@ -59,7 +59,10 @@ Singleton { readonly property Timer timer: Timer { running: true interval: notif.notification.expireTimeout > 0 ? notif.notification.expireTimeout : NotifsConfig.defaultExpireTimeout - onTriggered: notif.popup = false + onTriggered: { + if (NotifsConfig.expire) + notif.popup = false; + } } readonly property Connections conn: Connections { -- cgit v1.2.3-freya