notifications: better destroy animation

This commit is contained in:
end-4
2025-04-19 23:46:47 +02:00
parent 6ae0e5f84d
commit 9a82d40ddc
2 changed files with 77 additions and 15 deletions
@@ -44,7 +44,7 @@ Item {
for (let i = notificationWidgetList.length - 1; i >= 0; i--) {
const widget = notificationWidgetList[i];
if (widget && widget.notificationObject && widget.notificationObject.id === id) {
widget.fancyDestroy();
widget.destroyWithAnimation();
notificationWidgetList.splice(i, 1);
}
}
@@ -53,7 +53,10 @@ Item {
Flickable { // Scrollable window
id: flickable
anchors.fill: parent
anchors.left: parent.left
anchors.right: parent.right
anchors.top: parent.top
anchors.bottom: statusRow.top
contentHeight: columnLayout.height
clip: true
@@ -66,4 +69,19 @@ Item {
// Notifications are added by the above signal handlers
}
}
RowLayout {
id: statusRow
anchors.left: parent.left
anchors.right: parent.right
anchors.bottom: parent.bottom
StyledText {
Layout.margins: 10
Layout.bottomMargin: 5
Layout.alignment: Qt.AlignVCenter
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
text: `${notificationWidgetList.length} Notifications`
}
}
}