forked from Shinonome/dots-hyprland
notifications: better destroy animation
This commit is contained in:
@@ -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`
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user