Use more standard durations

CCBUG: 433948

Note that this also makes the busy indicator stop spinning at all when
the user has disabled animations. Instead it just shows a static image.
This commit is contained in:
Nate Graham 2021-03-04 08:59:52 -07:00
parent 98810a7dd5
commit 177be0c79a
10 changed files with 26 additions and 18 deletions

View File

@ -60,9 +60,13 @@ T.BusyIndicator {
id: rotationAnimator
from: 0
to: 360
// Not using a standard duration value because we don't want the
// animation to spin faster or slower based on the user's animation
// scaling preferences; it doesn't make sense in this context
duration: 2000
loops: Animation.Infinite
running: visible && (control.running || baseItem.opacity > 0)
// Don't want it to animate at all if the user has disabled animations
running: visible && (control.running || baseItem.opacity > 0) && PlasmaCore.Units.longDuration > 1;
}
}
}

View File

@ -30,7 +30,7 @@ T.Dialog {
from: 0
to: 1
easing.type: Easing.InOutQuad
duration: 250
duration: PlasmaCore.Units.longDuration
}
}
@ -40,7 +40,7 @@ T.Dialog {
from: 1
to: 0
easing.type: Easing.InOutQuad
duration: 250
duration: PlasmaCore.Units.longDuration
}
}

View File

@ -72,7 +72,7 @@ T.Menu {
from: 0
to: 1
easing.type: Easing.InOutQuad
duration: 150
duration: PlasmaCore.Units.shortDuration
}
}
@ -82,7 +82,7 @@ T.Menu {
from: 1
to: 0
easing.type: Easing.InOutQuad
duration: 150
duration: PlasmaCore.Units.shortDuration
}
}

View File

@ -30,7 +30,7 @@ T.Popup {
from: 0
to: 1
easing.type: Easing.InOutQuad
duration: 250
duration: PlasmaCore.Units.longDuration
}
}
@ -40,7 +40,7 @@ T.Popup {
from: 1
to: 0
easing.type: Easing.InOutQuad
duration: 250
duration: PlasmaCore.Units.longDuration
}
}

View File

@ -45,7 +45,7 @@ T.ProgressBar {
PropertyAnimation {
target: indicator
property: "x"
duration: 800
duration: PlasmaCore.Units.veryLongDuration * 2
to: control.width - indicator.width
onToChanged: {
//the animation won't update the boundaries automatically
@ -57,7 +57,7 @@ T.ProgressBar {
PropertyAnimation {
target: indicator
property: "x"
duration: 800
duration: PlasmaCore.Units.veryLongDuration * 2
to: 0
}
}

View File

@ -35,8 +35,12 @@ BusyIndicatorStyle {
id: rotationAnimator
from: 0
to: 360
// Not using a standard duration value because we don't want the
// animation to spin faster or slower based on the user's animation
// scaling preferences; it doesn't make sense in this context
duration: 2000
running: control.running && control.visible && control.opacity > 0;
// Don't want it to animate at all if the user has disabled animations
running: control.running && control.visible && control.opacity > 0 && PlasmaCore.Units.longDuration > 1;
loops: Animation.Infinite
}
}

View File

@ -155,8 +155,8 @@ QtQuickControlStyle.ButtonStyle {
to: "normal"
//Cross fade from pressed to normal
ParallelAnimation {
NumberAnimation { target: surfaceNormal; property: "opacity"; to: 1; duration: 100 }
NumberAnimation { target: surfacePressed; property: "opacity"; to: 0; duration: 100 }
NumberAnimation { target: surfaceNormal; property: "opacity"; to: 1; duration: PlasmaCore.Units.shortDuration }
NumberAnimation { target: surfacePressed; property: "opacity"; to: 0; duration: PlasmaCore.Units.shortDuration }
}
}
]

View File

@ -93,8 +93,8 @@ QtQuickControlStyle.ComboBoxStyle {
to: "normal"
//Cross fade from pressed to normal
ParallelAnimation {
NumberAnimation { target: surfaceNormal; property: "opacity"; to: 1; duration: 100 }
NumberAnimation { target: surfacePressed; property: "opacity"; to: 0; duration: 100 }
NumberAnimation { target: surfaceNormal; property: "opacity"; to: 1; duration: PlasmaCore.Units.shortDuration }
NumberAnimation { target: surfacePressed; property: "opacity"; to: 0; duration: PlasmaCore.Units.shortDuration }
}
}
]

View File

@ -74,7 +74,7 @@ ProgressBarStyle {
PropertyAnimation {
target: progressSvg
property: "x"
duration: 800
duration: PlasmaCore.Units.veryLongDuration * 2
// The progress Item's width might be left over from the previous state
// so we use the control.width/height directly instead
to: control.width - units.gridUnit * 2
@ -88,7 +88,7 @@ ProgressBarStyle {
PropertyAnimation {
target: progressSvg
property: "x"
duration: 800
duration: PlasmaCore.Units.veryLongDuration * 2
to: 0
}
}

View File

@ -390,8 +390,8 @@ QtQuickControlStyle.ButtonStyle {
Transition {
//Cross fade from pressed to normal
ParallelAnimation {
NumberAnimation { target: surfaceNormal; property: "opacity"; duration: 100 }
NumberAnimation { target: surfacePressed; property: "opacity"; duration: 100 }
NumberAnimation { target: surfaceNormal; property: "opacity"; duration: PlasmaCore.Units.shortDuration }
NumberAnimation { target: surfacePressed; property: "opacity"; duration: PlasmaCore.Units.shortDuration }
}
}
]