From f2d5ee46929b1ce2c920755a5e62e62d3d05c542 Mon Sep 17 00:00:00 2001 From: purian23 Date: Fri, 29 May 2026 22:04:46 -0400 Subject: [PATCH] fix(animation): adjust the Popout/Control Center motion --- quickshell/Widgets/DankPopoutConnected.qml | 7 +++++-- quickshell/Widgets/DankPopoutStandalone.qml | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/quickshell/Widgets/DankPopoutConnected.qml b/quickshell/Widgets/DankPopoutConnected.qml index 24f81372..2db2cb8a 100644 --- a/quickshell/Widgets/DankPopoutConnected.qml +++ b/quickshell/Widgets/DankPopoutConnected.qml @@ -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 diff --git a/quickshell/Widgets/DankPopoutStandalone.qml b/quickshell/Widgets/DankPopoutStandalone.qml index dfd20198..9126c0bb 100644 --- a/quickshell/Widgets/DankPopoutStandalone.qml +++ b/quickshell/Widgets/DankPopoutStandalone.qml @@ -407,9 +407,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. + readonly property bool _settlingToOpen: _fullHeight && 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 @@ -418,7 +420,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 @@ -731,6 +733,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