mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2026-06-07 04:15:26 +00:00
SmartPanel: speeding up closing animation for a better UX.
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user