mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
SmartPanel: speeding up closing animation for a better UX.
This commit is contained in:
@@ -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