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 QtQuick 2.0
import "Animations.js" as Animations import org.kde.plasma.core 2.0 as PlasmaCore
SequentialAnimation { SequentialAnimation {
id: activateAnimation id: activateAnimation
objectName: "activateAnimation" objectName: "activateAnimation"
property Item targetItem property Item targetItem
property int duration: Animations.normalDuration/5 property int duration: units.shortDuration
// Fast scaling while we're animation == more FPS // Fast scaling while we're animation == more FPS
ScriptAction { script: targetItem.smooth = false } 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 QtQuick 2.0
import "Animations.js" as Animations
SequentialAnimation { SequentialAnimation {
id: appearAnimation id: appearAnimation
objectName: "appearAnimation" objectName: "appearAnimation"
property Item targetItem property Item targetItem
property int duration: Animations.normalDuration property int duration: units.longDuration
// Fast scaling while we're animation == more FPS // Fast scaling while we're animation == more FPS
ScriptAction { script: { targetItem.smooth = false; targetItem.visible = true; } } ScriptAction { script: { targetItem.smooth = false; targetItem.visible = true; } }

View File

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

View File

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

View File

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