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:
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user