Warning, /plasma/libplasma/src/declarativeimports/plasmaextracomponents/qml/animations/AppearAnimation.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: appearAnimation
0012     objectName: "appearAnimation"
0013 
0014     property Item targetItem
0015     property int duration: Kirigami.Units.longDuration
0016 
0017     // Animators run on the render thread so they kick in slightly delayed
0018     // so explicitly set the item's opacity to 0 before starting the animation
0019     ScriptAction {
0020         script: {
0021             targetItem.opacity = 0
0022         }
0023     }
0024 
0025     ParallelAnimation {
0026         OpacityAnimator {
0027             target: targetItem
0028             from: 0
0029             to: 1.0
0030             duration: appearAnimation.duration
0031             easing.type: Easing.InExpo
0032         }
0033         ScaleAnimator {
0034             target: targetItem
0035             from: 0.8
0036             to: 1.0
0037             duration: appearAnimation.duration
0038             easing.type: Easing.InExpo
0039         }
0040     }
0041 }