SmartPanel: speeding up closing animation for a better UX.

This commit is contained in:
ItsLemmy
2025-11-06 23:54:25 -05:00
parent 50b0cf0bcf
commit cd630a4f47
2 changed files with 12 additions and 3 deletions
+11 -3
View File
@@ -506,7 +506,7 @@ Item {
Behavior on opacity {
NumberAnimation {
id: opacityAnimation
duration: Style.animationFast
duration: isClosing ? Style.animationFaster : Style.animationFast
easing.type: Easing.OutQuad
onRunningChanged: {
@@ -634,7 +634,11 @@ Item {
Behavior on width {
NumberAnimation {
id: widthAnimation
duration: root.barIsVertical ? Style.animationNormal : 0
duration: {
if (!root.barIsVertical)
return 0
return root.isClosing ? Style.animationFast : Style.animationNormal
}
easing.type: Easing.BezierSpline
easing.bezierCurve: panelBackground.bezierCurve
@@ -650,7 +654,11 @@ Item {
Behavior on height {
NumberAnimation {
id: heightAnimation
duration: !root.barIsVertical ? Style.animationNormal : 0
duration: {
if (root.barIsVertical)
return 0
return root.isClosing ? Style.animationFast : Style.animationNormal
}
easing.type: Easing.BezierSpline
easing.bezierCurve: panelBackground.bezierCurve