Warning, /plasma/latte-dock/plasmoid/package/contents/ui/task/animations/launcher/BounceAnimation.qml is written in an unsupported language. File is not indexed.
0001 /* 0002 SPDX-FileCopyrightText: 2020 Michail Vourlakos <mvourlakos@gmail.com> 0003 SPDX-License-Identifier: GPL-2.0-or-later 0004 */ 0005 0006 import QtQuick 2.0 0007 0008 import org.kde.plasma.plasmoid 2.0 0009 0010 SequentialAnimation{ 0011 readonly property string bouncePropertyName: taskItem.isVertical ? "iconAnimatedOffsetX" : "iconAnimatedOffsetY" 0012 0013 Component.onDestruction: { 0014 //! make sure to return on initial position even when the animation is destroyed in the middle 0015 if (taskItem.isVertical) { 0016 taskItem.iconAnimatedOffsetX = 0; 0017 } else { 0018 taskItem.iconAnimatedOffsetY = 0; 0019 } 0020 } 0021 0022 //Ghost animation that acts as a delayer 0023 PropertyAnimation { 0024 target: taskItem.parabolicItem 0025 property: "opacity" 0026 to: 1 0027 duration: 50 0028 easing.type: Easing.InQuad 0029 } 0030 //end of ghost animation 0031 0032 ParallelAnimation { 0033 PropertyAnimation { 0034 target: taskItem.parabolicItem 0035 property: "zoom" 0036 to: 1 0037 duration: launcherAnimation.speed 0038 easing.type: Easing.OutQuad 0039 } 0040 0041 PropertyAnimation { 0042 target: taskItem 0043 property: bouncePropertyName 0044 to: taskItem.abilities.metrics.iconSize 0045 duration: launcherAnimation.speed 0046 easing.type: Easing.OutQuad 0047 } 0048 } 0049 0050 PropertyAnimation { 0051 target: taskItem 0052 property: bouncePropertyName 0053 to: 0 0054 duration: 4*launcherAnimation.speed 0055 easing.type: Easing.OutBounce 0056 } 0057 0058 onStopped: { 0059 //! make sure to return on initial position even when the animation is destroyed in the middle 0060 if (taskItem.isVertical) { 0061 taskItem.iconAnimatedOffsetX = 0; 0062 } else { 0063 taskItem.iconAnimatedOffsetY = 0; 0064 } 0065 } 0066 }