Added to notification panel to hide when no notifications or when moused off

This commit is contained in:
2025-09-26 17:00:31 -04:00
parent c5e2a7277c
commit 782b320b67

View File

@@ -11,16 +11,26 @@ Scope {
property bool visible: false
property int panelWidth: 350
Timer {
id: hideTimer
interval: Config.options.osd.timeout
onTriggered: GlobalStates.notificationPanelOpen = false
}
Timer {
id: quickHideTimer
interval: 1
onTriggered: GlobalStates.notificationPanelOpen = false
}
Loader {
id: notificationPanelLoader
active: GlobalStates.notificationPanelOpen
/**
onActiveChanged: {
if (!notificationPanelLoader.active & NotificationServer.amountNotifications == 0) {
GlobalStates.notificationPanelOpen = false;
if (notificationPanelLoader.active & NotificationService.amountNotifications == 0) {
quickHideTimer.restart();
}
}
//*/
sourceComponent: PanelWindow {
id: notificationPanelRoot
@@ -49,6 +59,16 @@ Scope {
color: Config.options.bar.showBackground ? Appearance.colors.colLayer1 : "transparent"
}
MouseArea {
id: notificationArea
anchors.fill: parent
hoverEnabled: true
onExited: () => {
hideTimer.restart();
}
onEntered: () => {
hideTimer.stop();
}
ColumnLayout {
id: notifs
anchors.margins: 4
@@ -66,4 +86,5 @@ Scope {
}
}
}
}
}