Libplasma

PressedAnimation.qml
1/*
2 SPDX-FileCopyrightText: 2011 Sebastian Kügler <sebas@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7import QtQuick
8import org.kde.kirigami as Kirigami
9
10SequentialAnimation {
11 id: pressedAnimation
12 objectName: "pressedAnimation"
13
14 property Item targetItem
15 property int duration: Kirigami.Units.shortDuration
16
17 // Fast scaling while we're animation == more FPS
18 ScriptAction { script: targetItem.smooth = false }
19
20 ParallelAnimation {
21 PropertyAnimation {
22 target: targetItem
23 properties: "opacity"
24 from: 1.0; to: 0.8
25 duration: pressedAnimation.duration;
26 easing.type: Easing.OutExpo;
27 }
28 PropertyAnimation {
29 target: targetItem
30 properties: "scale"
31 from: 1.0; to: 0.95
32 duration: pressedAnimation.duration;
33 easing.type: Easing.OutExpo;
34 }
35 }
36 ScriptAction { script: targetItem.smooth = true }
37}
KGuiItem properties()
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:34:35 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.