PlasmaExtras' animations use units.*Duration

This commit is contained in:
Sebastian Kügler 2014-02-03 16:41:57 +01:00
parent 90d2afb722
commit 2ba6bd6cbc
6 changed files with 9 additions and 18 deletions

View File

@ -19,14 +19,14 @@
*/
import QtQuick 2.0
import "Animations.js" as Animations
import org.kde.plasma.core 2.0 as PlasmaCore
SequentialAnimation {
id: activateAnimation
objectName: "activateAnimation"
property Item targetItem
property int duration: Animations.normalDuration/5
property int duration: units.shortDuration
// Fast scaling while we're animation == more FPS
ScriptAction { script: targetItem.smooth = false }

View File

@ -1,8 +0,0 @@
.pragma library
// a normal animation
var normalDuration = units.longDuration;
// for direct feedback, such as tapping
var feedbackDuration = units.shortDuration;

View File

@ -19,14 +19,13 @@
*/
import QtQuick 2.0
import "Animations.js" as Animations
SequentialAnimation {
id: appearAnimation
objectName: "appearAnimation"
property Item targetItem
property int duration: Animations.normalDuration
property int duration: units.longDuration
// Fast scaling while we're animation == more FPS
ScriptAction { script: { targetItem.smooth = false; targetItem.visible = true; } }

View File

@ -19,14 +19,14 @@
*/
import QtQuick 2.0
import "Animations.js" as Animations
import org.kde.plasma.core 2.0 as PlasmaCore
SequentialAnimation {
id: disappearAnimation
objectName: "disappearAnimation"
property Item targetItem
property int duration: Animations.normalDuration
property int duration: units.longDuration
ScriptAction { script: targetItem.smooth = false; }

View File

@ -19,14 +19,14 @@
*/
import QtQuick 2.0
import "Animations.js" as Animations
import org.kde.plasma.core 2.0 as PlasmaCore
SequentialAnimation {
id: pressedAnimation
objectName: "pressedAnimation"
property Item targetItem
property int duration: Animations.feedbackDuration
property int duration: units.shortDuration
// Fast scaling while we're animation == more FPS
ScriptAction { script: targetItem.smooth = false }

View File

@ -19,14 +19,14 @@
*/
import QtQuick 2.0
import "Animations.js" as Animations
import org.kde.plasma.core 2.0 as PlasmaCore
SequentialAnimation {
id: releasedAnimation
objectName: "releasedAnimation"
property Item targetItem
property int duration: Animations.feedbackDuration
property int duration: units.shortDuration
// Fast scaling while we're animation == more FPS
ScriptAction { script: targetItem.smooth = false }