Commit c22feb74 authored by Nate Graham's avatar Nate Graham
Browse files

Use more standard duration values

This lets these durations be scaled or disabled according to the user's
preferences.

CCBUG: 433948
parent 9dba1a78
......@@ -70,7 +70,7 @@ PlasmaCore.SvgItem {
Behavior on angle {
RotationAnimation {
id: anim
duration: 200
duration: PlasmaCore.Units.longDuration
direction: RotationAnimation.Clockwise
easing.type: Easing.OutElastic
easing.overshoot: 0.5
......
......@@ -90,7 +90,7 @@ PlasmaComponents3.Page {
target: messageHighlight
from: 1
to: 0
duration: 3000
duration: PlasmaCore.Units.veryLongDuration * 8
easing.type: Easing.InOutQuad
}
......
......@@ -19,13 +19,14 @@
*/
import QtQuick 2.2
import org.kde.plasma.core 2.0 as PlasmaCore
SequentialAnimation {
id: pulseAnimation
objectName: "pulseAnimation"
property Item targetItem
readonly property int duration: 2000
readonly property int duration: PlasmaCore.Units.veryLongDuration * 5
loops: Animation.Infinite
alwaysRunToEnd: true
......
......@@ -70,7 +70,7 @@ PlasmaCore.SvgItem {
Behavior on angle {
RotationAnimation {
id: anim
duration: 200
duration: PlasmaCore.Units.longDuration
direction: RotationAnimation.Clockwise
easing.type: Easing.OutElastic
easing.overshoot: 0.5
......
......@@ -43,7 +43,7 @@ Item {
NumberAnimation {
target: wallpaperFader
property: "factor"
duration: 1000
duration: PlasmaCore.Units.veryLongDuration * 2
easing.type: Easing.InOutQuad
}
}
......@@ -157,7 +157,7 @@ Item {
NumberAnimation {
targets: [mainStack, footer, clock]
property: "opacity"
duration: units.longDuration
duration: units.veryLongDuration
easing.type: Easing.InOutQuad
}
},
......@@ -167,7 +167,7 @@ Item {
NumberAnimation {
targets: [mainStack, footer, clock]
property: "opacity"
duration: 500
duration: PlasmaCore.Units.veryLongDuration
easing.type: Easing.InOutQuad
}
}
......
......@@ -149,7 +149,7 @@ KWin.Switcher {
prefix: "hover"
width: listView.width
}
highlightMoveDuration: 250
highlightMoveDuration: PlasmaCore.Units.longDuration
boundsBehavior: Flickable.StopAtBounds
Connections {
target: tabBox
......
......@@ -56,7 +56,7 @@ PlasmaCore.FrameSvgItem {
SequentialAnimation {
id: hideAnimation
// prevent press and hold from flickering
PauseAnimation { duration: 100 }
PauseAnimation { duration: PlasmaCore.Units.shortDuration }
NumberAnimation {
target: osd
property: "opacity"
......
......@@ -139,7 +139,7 @@ PlasmaCore.ColorScope {
}
}
Component.onCompleted: PropertyAnimation { id: launchAnimation; target: lockScreenRoot; property: "opacity"; from: 0; to: 1; duration: 1000 }
Component.onCompleted: PropertyAnimation { id: launchAnimation; target: lockScreenRoot; property: "opacity"; from: 0; to: 1; duration: PlasmaCore.Units.veryLongDuration * 2 }
states: [
State {
......@@ -158,8 +158,8 @@ PlasmaCore.ColorScope {
from: ""
to: "onOtherSession"
PropertyAnimation { id: stateChangeAnimation; properties: "y"; duration: 300; easing.type: Easing.InQuad}
PropertyAnimation { properties: "opacity"; duration: 300}
PropertyAnimation { id: stateChangeAnimation; properties: "y"; duration: PlasmaCore.Units.longDuration; easing.type: Easing.InQuad}
PropertyAnimation { properties: "opacity"; duration: PlasmaCore.Units.longDuration}
onRunningChanged: {
// after the animation has finished switch session: since we only animate the transition TO state "onOtherSession"
......@@ -192,7 +192,7 @@ PlasmaCore.ColorScope {
color: lockScreenUi.lightBackground ? PlasmaCore.ColorScope.backgroundColor : "black" // black matches Breeze window decoration and desktopcontainment
Behavior on opacity {
OpacityAnimator {
duration: 1000
duration: PlasmaCore.Units.veryLongDuration * 2
easing.type: Easing.InOutQuad
}
}
......
......@@ -63,6 +63,7 @@ Rectangle {
sourceSize.height: size
}
// TODO: port to PlasmaComponents3.BusyIndicator
Image {
id: busyIndicator
//in the middle of the remaining space
......@@ -75,8 +76,13 @@ Rectangle {
id: rotationAnimator
from: 0
to: 360
duration: 1500
// 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
// Don't want it to animate at all if the user has disabled animations
running: PlasmaCore.Units.longDuration > 1
}
}
Row {
......@@ -108,7 +114,7 @@ Rectangle {
target: content
from: 0
to: 1
duration: 1000
duration: PlasmaCore.Units.veryLongDuration * 2
easing.type: Easing.InOutQuad
}
}
......@@ -56,7 +56,7 @@ KWin.Switcher {
id: thumbnailListView
model: tabBox.model
spacing: units.smallSpacing
highlightMoveDuration: 250
highlightMoveDuration: PlasmaCore.Units.longDuration
highlightResizeDuration: 0
Connections {
......
......@@ -139,7 +139,7 @@ PlasmaCore.ColorScope {
color: root.lightBackground ? PlasmaCore.ColorScope.backgroundColor : "black" // black matches Breeze window decoration and desktopcontainment
Behavior on opacity {
OpacityAnimator {
duration: 1000
duration: PlasmaCore.Units.veryLongDuration * 2
easing.type: Easing.InOutQuad
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment