1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-06-07 19:59:14 -04:00

fix(animation): adjust the Popout/Control Center motion

This commit is contained in:
purian23
2026-05-29 22:04:46 -04:00
parent 7c2d5ce15e
commit f2d5ee4692
2 changed files with 10 additions and 4 deletions
+5 -2
View File
@@ -576,9 +576,11 @@ Item {
property real renderedAlignedY: alignedY property real renderedAlignedY: alignedY
property real renderedAlignedHeight: alignedHeight property real renderedAlignedHeight: alignedHeight
readonly property bool renderedGeometryGrowing: alignedHeight >= renderedAlignedHeight readonly property bool renderedGeometryGrowing: alignedHeight >= renderedAlignedHeight
// Snap rendered geometry while the entrance morph runs so it doesn't ride a second animation (side-bar ramp).
readonly property bool _settlingToOpen: fullHeightSurface && shouldBeVisible && morphAnim.running
Behavior on renderedAlignedY { Behavior on renderedAlignedY {
enabled: root.animationsEnabled && contentWindow.visible && root.shouldBeVisible enabled: root.animationsEnabled && contentWindow.visible && root.shouldBeVisible && !root._settlingToOpen
NumberAnimation { NumberAnimation {
duration: Theme.variantDuration(root.animationDuration, root.renderedGeometryGrowing) duration: Theme.variantDuration(root.animationDuration, root.renderedGeometryGrowing)
easing.type: Easing.BezierSpline easing.type: Easing.BezierSpline
@@ -587,7 +589,7 @@ Item {
} }
Behavior on renderedAlignedHeight { Behavior on renderedAlignedHeight {
enabled: root.animationsEnabled && contentWindow.visible && root.shouldBeVisible enabled: root.animationsEnabled && contentWindow.visible && root.shouldBeVisible && !root._settlingToOpen
NumberAnimation { NumberAnimation {
duration: Theme.variantDuration(root.animationDuration, root.renderedGeometryGrowing) duration: Theme.variantDuration(root.animationDuration, root.renderedGeometryGrowing)
easing.type: Easing.BezierSpline easing.type: Easing.BezierSpline
@@ -898,6 +900,7 @@ Item {
Behavior on openProgress { Behavior on openProgress {
enabled: root.animationsEnabled enabled: root.animationsEnabled
NumberAnimation { NumberAnimation {
id: morphAnim
duration: Theme.variantDuration(root.animationDuration, root.shouldBeVisible) duration: Theme.variantDuration(root.animationDuration, root.shouldBeVisible)
easing.type: Easing.BezierSpline easing.type: Easing.BezierSpline
easing.bezierCurve: root.shouldBeVisible ? root.animationEnterCurve : root.animationExitCurve easing.bezierCurve: root.shouldBeVisible ? root.animationEnterCurve : root.animationExitCurve
+5 -2
View File
@@ -407,9 +407,11 @@ Item {
property real renderedAlignedY: alignedY property real renderedAlignedY: alignedY
property real renderedAlignedHeight: alignedHeight property real renderedAlignedHeight: alignedHeight
readonly property bool renderedGeometryGrowing: alignedHeight >= renderedAlignedHeight readonly property bool renderedGeometryGrowing: alignedHeight >= renderedAlignedHeight
// Snap rendered geometry while the entrance morph runs so it doesn't ride a second animation.
readonly property bool _settlingToOpen: _fullHeight && shouldBeVisible && morphAnim.running
Behavior on renderedAlignedY { Behavior on renderedAlignedY {
enabled: root.animationsEnabled && contentWindow.visible && root.shouldBeVisible enabled: root.animationsEnabled && contentWindow.visible && root.shouldBeVisible && !root._settlingToOpen
NumberAnimation { NumberAnimation {
duration: Theme.variantDuration(root.animationDuration, root.renderedGeometryGrowing) duration: Theme.variantDuration(root.animationDuration, root.renderedGeometryGrowing)
easing.type: Easing.BezierSpline easing.type: Easing.BezierSpline
@@ -418,7 +420,7 @@ Item {
} }
Behavior on renderedAlignedHeight { Behavior on renderedAlignedHeight {
enabled: root.animationsEnabled && contentWindow.visible && root.shouldBeVisible enabled: root.animationsEnabled && contentWindow.visible && root.shouldBeVisible && !root._settlingToOpen
NumberAnimation { NumberAnimation {
duration: Theme.variantDuration(root.animationDuration, root.renderedGeometryGrowing) duration: Theme.variantDuration(root.animationDuration, root.renderedGeometryGrowing)
easing.type: Easing.BezierSpline easing.type: Easing.BezierSpline
@@ -731,6 +733,7 @@ Item {
Behavior on openProgress { Behavior on openProgress {
enabled: root.animationsEnabled enabled: root.animationsEnabled
NumberAnimation { NumberAnimation {
id: morphAnim
duration: Theme.variantDuration(root.animationDuration, root.shouldBeVisible) duration: Theme.variantDuration(root.animationDuration, root.shouldBeVisible)
easing.type: Easing.BezierSpline easing.type: Easing.BezierSpline
easing.bezierCurve: root.shouldBeVisible ? root.animationEnterCurve : root.animationExitCurve easing.bezierCurve: root.shouldBeVisible ? root.animationEnterCurve : root.animationExitCurve