Libplasma

AppearAnimation.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: appearAnimation
12 objectName: "appearAnimation"
13
14 property Item targetItem
15 property int duration: Kirigami.Units.longDuration
16
17 // Animators run on the render thread so they kick in slightly delayed
18 // so explicitly set the item's opacity to 0 before starting the animation
19 ScriptAction {
20 script: {
21 targetItem.opacity = 0
22 }
23 }
24
25 ParallelAnimation {
26 OpacityAnimator {
27 target: targetItem
28 from: 0
29 to: 1.0
30 duration: appearAnimation.duration
31 easing.type: Easing.InExpo
32 }
33 ScaleAnimator {
34 target: targetItem
35 from: 0.8
36 to: 1.0
37 duration: appearAnimation.duration
38 easing.type: Easing.InExpo
39 }
40 }
41}
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.