mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-04-04 21:02:06 -04:00
notifications: Refactor Animations
This commit is contained in:
@@ -10,7 +10,6 @@ DankPopout {
|
||||
|
||||
property bool notificationHistoryVisible: false
|
||||
property var triggerScreen: null
|
||||
property bool _animatePopupHeight: false
|
||||
|
||||
NotificationKeyboardController {
|
||||
id: keyboardController
|
||||
@@ -24,14 +23,9 @@ DankPopout {
|
||||
popupWidth: 400
|
||||
popupHeight: contentLoader.item ? contentLoader.item.implicitHeight : 400
|
||||
positioning: ""
|
||||
animationScaleCollapsed: 1.0
|
||||
animationOffset: 0
|
||||
|
||||
Behavior on popupHeight {
|
||||
enabled: root._animatePopupHeight
|
||||
NumberAnimation {
|
||||
duration: Math.min(Theme.shortDuration, 150)
|
||||
easing.type: Theme.emphasizedEasing
|
||||
}
|
||||
}
|
||||
screen: triggerScreen
|
||||
shouldBeVisible: notificationHistoryVisible
|
||||
|
||||
@@ -81,13 +75,10 @@ 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;
|
||||
}
|
||||
@@ -116,6 +107,7 @@ DankPopout {
|
||||
|
||||
property var externalKeyboardController: null
|
||||
property real cachedHeaderHeight: 32
|
||||
property bool notificationListAnimating: notificationList.isAnimatingExpansion
|
||||
|
||||
implicitHeight: {
|
||||
let baseHeight = Theme.spacingL * 2;
|
||||
@@ -210,7 +202,7 @@ DankPopout {
|
||||
visible: notificationHeader.currentTab === 0
|
||||
width: parent.width
|
||||
height: parent.height - notificationContent.cachedHeaderHeight - notificationSettings.height - contentColumnInner.spacing * 2
|
||||
cardAnimateExpansion: false
|
||||
cardAnimateExpansion: true
|
||||
}
|
||||
|
||||
HistoryNotificationList {
|
||||
|
||||
Reference in New Issue
Block a user