diff --git a/Commons/Style.qml b/Commons/Style.qml index d6beefc3..8dad33d5 100644 --- a/Commons/Style.qml +++ b/Commons/Style.qml @@ -65,6 +65,7 @@ Singleton { property real shadowVerticalOffset: Settings.data.general.shadowOffsetY // Animation duration (ms) + property int animationFaster: Settings.data.general.animationDisabled ? 0 : Math.round(75 / Settings.data.general.animationSpeed) property int animationFast: Settings.data.general.animationDisabled ? 0 : Math.round(150 / Settings.data.general.animationSpeed) property int animationNormal: Settings.data.general.animationDisabled ? 0 : Math.round(300 / Settings.data.general.animationSpeed) property int animationSlow: Settings.data.general.animationDisabled ? 0 : Math.round(450 / Settings.data.general.animationSpeed) diff --git a/Modules/MainScreen/SmartPanel.qml b/Modules/MainScreen/SmartPanel.qml index 94a6b47e..1afc5d2c 100644 --- a/Modules/MainScreen/SmartPanel.qml +++ b/Modules/MainScreen/SmartPanel.qml @@ -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