mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-04-13 09:12:08 -04:00
notifications: Update group expansion card animations
This commit is contained in:
@@ -93,8 +93,8 @@ DankListView {
|
|||||||
}
|
}
|
||||||
|
|
||||||
width: ListView.view.width
|
width: ListView.view.width
|
||||||
height: isDismissing ? 0 : notificationCard.height
|
height: isDismissing ? 0 : notificationCard.targetHeight
|
||||||
clip: isDismissing
|
clip: isDismissing || notificationCard.isAnimating
|
||||||
|
|
||||||
NotificationCard {
|
NotificationCard {
|
||||||
id: notificationCard
|
id: notificationCard
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ Rectangle {
|
|||||||
|
|
||||||
width: parent ? parent.width : 400
|
width: parent ? parent.width : 400
|
||||||
height: expanded ? (expandedContent.height + cardPadding * 2) : (baseCardHeight + collapsedContent.extraHeight)
|
height: expanded ? (expandedContent.height + cardPadding * 2) : (baseCardHeight + collapsedContent.extraHeight)
|
||||||
|
readonly property real targetHeight: expanded ? (expandedContent.height + cardPadding * 2) : (baseCardHeight + collapsedContent.extraHeight)
|
||||||
radius: Theme.cornerRadius
|
radius: Theme.cornerRadius
|
||||||
property bool __initialized: false
|
property bool __initialized: false
|
||||||
|
|
||||||
@@ -734,8 +735,9 @@ Rectangle {
|
|||||||
Behavior on height {
|
Behavior on height {
|
||||||
enabled: root.userInitiatedExpansion && root.animateExpansion
|
enabled: root.userInitiatedExpansion && root.animateExpansion
|
||||||
NumberAnimation {
|
NumberAnimation {
|
||||||
duration: Theme.mediumDuration
|
duration: Theme.expressiveDurations.normal
|
||||||
easing.type: root.expanded ? Theme.emphasizedEasing : Theme.standardEasing
|
easing.type: Easing.BezierSpline
|
||||||
|
easing.bezierCurve: Theme.expressiveCurves.standard
|
||||||
onRunningChanged: {
|
onRunningChanged: {
|
||||||
if (running) {
|
if (running) {
|
||||||
root.isAnimating = true;
|
root.isAnimating = true;
|
||||||
|
|||||||
@@ -107,8 +107,6 @@ DankPopout {
|
|||||||
|
|
||||||
property var externalKeyboardController: null
|
property var externalKeyboardController: null
|
||||||
property real cachedHeaderHeight: 32
|
property real cachedHeaderHeight: 32
|
||||||
property bool notificationListAnimating: notificationList.isAnimatingExpansion
|
|
||||||
|
|
||||||
implicitHeight: {
|
implicitHeight: {
|
||||||
let baseHeight = Theme.spacingL * 2;
|
let baseHeight = Theme.spacingL * 2;
|
||||||
baseHeight += cachedHeaderHeight;
|
baseHeight += cachedHeaderHeight;
|
||||||
|
|||||||
Reference in New Issue
Block a user