From e699dae499afd13e99be3a553ccce0194a4a8f08 Mon Sep 17 00:00:00 2001 From: lucy Date: Tue, 3 Feb 2026 13:25:40 +0100 Subject: [PATCH] add animations to notification --- modules/notifications/Notification.qml | 17 +++++++++++++++++ modules/notifications/NotificationCard.qml | 6 ------ 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/modules/notifications/Notification.qml b/modules/notifications/Notification.qml index 4d2dac6..32f1acd 100644 --- a/modules/notifications/Notification.qml +++ b/modules/notifications/Notification.qml @@ -43,6 +43,23 @@ Variants { model: NotiServer.trackedNotifications delegate: NotificationCard {} + add: Transition { + NumberAnimation { + property: "x" + from: notifList.width + to: 0 + duration: 400 + easing.type: Easing.OutExpo + } + } + + // Optional: Animate items moving up when one is dismissed + move: Transition { + NumberAnimation { + properties: "y" + duration: 300 + } + } } } } diff --git a/modules/notifications/NotificationCard.qml b/modules/notifications/NotificationCard.qml index 54e49fd..aa86558 100644 --- a/modules/notifications/NotificationCard.qml +++ b/modules/notifications/NotificationCard.qml @@ -8,12 +8,6 @@ import Quickshell.Widgets Rectangle { id: notifyItem - Behavior on implicitWidth { - NumberAnimation { - duration: 100 - easing: Easing.OutBack - } - } required property var modelData implicitWidth: ListView.view ? ListView.view.width : 300 implicitHeight: fullLayout.implicitHeight + 20