1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-04-04 21:02:06 -04:00

notifications: cap max anim speed in popout

This commit is contained in:
bbedward
2026-02-05 15:17:17 -05:00
parent 3d05c34673
commit 8944762c76
4 changed files with 21 additions and 7 deletions

View File

@@ -10,6 +10,7 @@ DankPopout {
property bool notificationHistoryVisible: false
property var triggerScreen: null
property bool _animatePopupHeight: false
NotificationKeyboardController {
id: keyboardController
@@ -23,6 +24,14 @@ DankPopout {
popupWidth: 400
popupHeight: contentLoader.item ? contentLoader.item.implicitHeight : 400
positioning: ""
Behavior on popupHeight {
enabled: root._animatePopupHeight
NumberAnimation {
duration: Math.min(Theme.shortDuration, 150)
easing.type: Theme.emphasizedEasing
}
}
screen: triggerScreen
shouldBeVisible: notificationHistoryVisible
@@ -72,10 +81,13 @@ DankPopout {
onShouldBeVisibleChanged: {
if (shouldBeVisible) {
_animatePopupHeight = false;
NotificationService.onOverlayOpen();
if (contentLoader.item)
Qt.callLater(setupKeyboardNavigation);
Qt.callLater(() => { root._animatePopupHeight = true; });
} else {
_animatePopupHeight = false;
NotificationService.onOverlayClose();
keyboardController.keyboardNavigationActive = false;
}
@@ -198,6 +210,7 @@ DankPopout {
visible: notificationHeader.currentTab === 0
width: parent.width
height: parent.height - notificationContent.cachedHeaderHeight - notificationSettings.height - contentColumnInner.spacing * 2
cardAnimateExpansion: false
}
HistoryNotificationList {