Small fixes for Notification

This commit is contained in:
Ly-sec 2025-08-11 13:02:44 +02:00
parent c7a07127d8
commit b2fb868cd7
3 changed files with 7 additions and 6 deletions

View file

@ -9,6 +9,7 @@ Variants {
delegate: PanelWindow {
required property ShellScreen modelData
property string wallpaperSource: Qt.resolvedUrl("../../Assets/Tests/wallpaper.png")
//property string wallpaperSource: Qt.resolvedUrl("/home/lysec/Pictures/wallpapers/wallhaven-6lqvql.jpg")
visible: wallpaperSource !== ""
color: "transparent"

View file

@ -17,8 +17,8 @@ PanelWindow {
visible: notificationService.notificationModel.count > 0
anchors.top: true
anchors.right: true
margins.top: (Style.barHeight + 10) * scaling
margins.right: 10 * scaling
margins.top: (Style.barHeight + Style.marginMedium) * scaling
margins.right: Style.marginMedium * scaling
implicitWidth: 360 * scaling
implicitHeight: Math.min(notificationStack.implicitHeight, (notificationService.maxVisible * 120) * scaling)
WlrLayershell.layer: WlrLayer.Overlay
@ -64,7 +64,7 @@ PanelWindow {
clip: true
color: Colors.backgroundSecondary
radius: Style.radiusMedium * scaling
border.color: Colors.accentTertiary
border.color: Colors.accentPrimary
border.width: Math.max(1, Style.borderThin * scaling)
// Animation properties

View file

@ -45,7 +45,7 @@ QtObject {
// Auto-hide timer
property Timer hideTimer: Timer {
interval: 5000 // 5 seconds
interval: 8000 // 8 seconds - longer display time
repeat: true
running: notificationModel.count > 0
@ -54,9 +54,9 @@ QtObject {
return
}
// Always remove the oldest notification (last in the list)
// Remove the oldest notification (last in the list)
let oldestNotification = notificationModel.get(notificationModel.count - 1).rawNotification
if (oldestNotification && !oldestNotification.transient) {
if (oldestNotification) {
// Trigger animation signal instead of direct dismiss
animateAndRemove(oldestNotification, notificationModel.count - 1)
}