mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-06-08 12:13:31 -04:00
fix(animation): adjust the Popout/Control Center motion
This commit is contained in:
@@ -576,9 +576,11 @@ Item {
|
||||
property real renderedAlignedY: alignedY
|
||||
property real renderedAlignedHeight: alignedHeight
|
||||
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 {
|
||||
enabled: root.animationsEnabled && contentWindow.visible && root.shouldBeVisible
|
||||
enabled: root.animationsEnabled && contentWindow.visible && root.shouldBeVisible && !root._settlingToOpen
|
||||
NumberAnimation {
|
||||
duration: Theme.variantDuration(root.animationDuration, root.renderedGeometryGrowing)
|
||||
easing.type: Easing.BezierSpline
|
||||
@@ -587,7 +589,7 @@ Item {
|
||||
}
|
||||
|
||||
Behavior on renderedAlignedHeight {
|
||||
enabled: root.animationsEnabled && contentWindow.visible && root.shouldBeVisible
|
||||
enabled: root.animationsEnabled && contentWindow.visible && root.shouldBeVisible && !root._settlingToOpen
|
||||
NumberAnimation {
|
||||
duration: Theme.variantDuration(root.animationDuration, root.renderedGeometryGrowing)
|
||||
easing.type: Easing.BezierSpline
|
||||
@@ -898,6 +900,7 @@ Item {
|
||||
Behavior on openProgress {
|
||||
enabled: root.animationsEnabled
|
||||
NumberAnimation {
|
||||
id: morphAnim
|
||||
duration: Theme.variantDuration(root.animationDuration, root.shouldBeVisible)
|
||||
easing.type: Easing.BezierSpline
|
||||
easing.bezierCurve: root.shouldBeVisible ? root.animationEnterCurve : root.animationExitCurve
|
||||
|
||||
Reference in New Issue
Block a user