add animations to notification

This commit is contained in:
lucy 2026-02-03 13:25:40 +01:00
parent 34fde2496a
commit e699dae499
2 changed files with 17 additions and 6 deletions

View File

@ -43,6 +43,23 @@ Variants {
model: NotiServer.trackedNotifications model: NotiServer.trackedNotifications
delegate: NotificationCard {} 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
}
}
} }
} }
} }

View File

@ -8,12 +8,6 @@ import Quickshell.Widgets
Rectangle { Rectangle {
id: notifyItem id: notifyItem
Behavior on implicitWidth {
NumberAnimation {
duration: 100
easing: Easing.OutBack
}
}
required property var modelData required property var modelData
implicitWidth: ListView.view ? ListView.view.width : 300 implicitWidth: ListView.view ? ListView.view.width : 300
implicitHeight: fullLayout.implicitHeight + 20 implicitHeight: fullLayout.implicitHeight + 20