Warning, /plasma/libplasma/src/declarativeimports/plasmaextracomponents/qml/animations/PressedAnimation.qml is written in an unsupported language. File is not indexed.

0001 /*
0002     SPDX-FileCopyrightText: 2011 Sebastian Kügler <sebas@kde.org>
0003 
0004     SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 import QtQuick
0008 import org.kde.kirigami as Kirigami
0009 
0010 SequentialAnimation {
0011     id: pressedAnimation
0012     objectName: "pressedAnimation"
0013 
0014     property Item targetItem
0015     property int duration: Kirigami.Units.shortDuration
0016 
0017     // Fast scaling while we're animation == more FPS
0018     ScriptAction { script: targetItem.smooth = false }
0019 
0020     ParallelAnimation {
0021         PropertyAnimation {
0022             target: targetItem
0023             properties: "opacity"
0024             from: 1.0; to: 0.8
0025             duration: pressedAnimation.duration;
0026             easing.type: Easing.OutExpo;
0027         }
0028         PropertyAnimation {
0029             target: targetItem
0030             properties: "scale"
0031             from: 1.0; to: 0.95
0032             duration: pressedAnimation.duration;
0033             easing.type: Easing.OutExpo;
0034         }
0035     }
0036     ScriptAction { script: targetItem.smooth = true }
0037 }