notifs: option to have expire timeout
Also remove scrollbar and reduce expand drag threshold
This commit is contained in:
parent
78ce9835ca
commit
ae67668fc2
3 changed files with 6 additions and 5 deletions
|
|
@ -4,9 +4,10 @@ import Quickshell
|
||||||
import QtQuick
|
import QtQuick
|
||||||
|
|
||||||
Singleton {
|
Singleton {
|
||||||
|
readonly property bool expire: false
|
||||||
readonly property int defaultExpireTimeout: 3000
|
readonly property int defaultExpireTimeout: 3000
|
||||||
readonly property real clearThreshold: 0.3
|
readonly property real clearThreshold: 0.3
|
||||||
readonly property int expandThreshold: 30
|
readonly property int expandThreshold: 20
|
||||||
readonly property Sizes sizes: Sizes {}
|
readonly property Sizes sizes: Sizes {}
|
||||||
|
|
||||||
component Sizes: QtObject {
|
component Sizes: QtObject {
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,6 @@ import "root:/services"
|
||||||
import "root:/config"
|
import "root:/config"
|
||||||
import Quickshell
|
import Quickshell
|
||||||
import QtQuick
|
import QtQuick
|
||||||
import QtQuick.Controls
|
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: root
|
id: root
|
||||||
|
|
@ -41,8 +40,6 @@ Item {
|
||||||
|
|
||||||
delegate: Notification {}
|
delegate: Notification {}
|
||||||
|
|
||||||
ScrollBar.vertical: StyledScrollBar {}
|
|
||||||
|
|
||||||
add: Transition {
|
add: Transition {
|
||||||
Anim {
|
Anim {
|
||||||
property: "x"
|
property: "x"
|
||||||
|
|
|
||||||
|
|
@ -59,7 +59,10 @@ Singleton {
|
||||||
readonly property Timer timer: Timer {
|
readonly property Timer timer: Timer {
|
||||||
running: true
|
running: true
|
||||||
interval: notif.notification.expireTimeout > 0 ? notif.notification.expireTimeout : NotifsConfig.defaultExpireTimeout
|
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 {
|
readonly property Connections conn: Connections {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue