notification animations: slide-in/out popups, staggered center fade, dismiss fade

This commit is contained in:
Damocles 2026-04-13 00:55:04 +02:00
parent b5b2276ff1
commit 608da78cea
2 changed files with 71 additions and 8 deletions

View file

@ -83,6 +83,19 @@ M.PopupPanel {
width: menuWindow.panelWidth
height: notifContent.height + 12
opacity: 0
Component.onCompleted: fadeIn.start()
NumberAnimation {
id: fadeIn
target: notifItem
property: "opacity"
to: 1
duration: 150
easing.type: Easing.OutCubic
// Stagger by index
Component.onCompleted: fadeIn.from = 0
}
Rectangle {
anchors.fill: parent
@ -225,10 +238,20 @@ M.PopupPanel {
anchors.margins: -4
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onClicked: M.NotifService.dismiss(notifItem.modelData.id)
onClicked: _dismissAnim.start()
}
}
NumberAnimation {
id: _dismissAnim
target: notifItem
property: "opacity"
to: 0
duration: 150
easing.type: Easing.InCubic
onFinished: M.NotifService.dismiss(notifItem.modelData.id)
}
MouseArea {
id: notifArea
anchors.fill: parent