mirror of
https://github.com/KDE/latte-dock.git
synced 2024-12-23 13:33:50 +03:00
tasks:always finish bouncing animation
--more specific when a new window is added or when the in attention bouncing animation is not needed any more
This commit is contained in:
parent
5100deee38
commit
4401fdbb0f
@ -102,7 +102,7 @@ Item {
|
||||
|
||||
State{
|
||||
name: "animating"
|
||||
when: !taskItem.inAddRemoveAnimation && (launcherAnimation.running || newWindowAnimation.running || fastRestoreAnimation.running)
|
||||
when: !taskItem.inAddRemoveAnimation && (launcherAnimation.running || newWindowAnimation.running)
|
||||
|
||||
AnchorChanges{
|
||||
target: taskIconItem;
|
||||
@ -121,8 +121,6 @@ Item {
|
||||
Transition{
|
||||
from: "animating"
|
||||
to: "*"
|
||||
enabled: !fastRestoreAnimation.running
|
||||
|
||||
AnchorAnimation { duration: 1.5 * taskItem.abilities.animations.speedFactor.current * taskItem.abilities.animations.duration.large }
|
||||
}
|
||||
]
|
||||
@ -438,8 +436,6 @@ Item {
|
||||
TaskAnimations.NewWindowAnimation { id: newWindowAnimation }
|
||||
|
||||
TaskAnimations.RemoveWindowFromGroupAnimation { id: removingAnimation }
|
||||
|
||||
TaskAnimations.FastRestoreAnimation { id: fastRestoreAnimation }
|
||||
//! Animations
|
||||
|
||||
Component.onDestruction: {
|
||||
|
@ -28,9 +28,8 @@ AbilityItem.BasicItem {
|
||||
|
||||
isHidden: !visible || isForcedHidden
|
||||
|
||||
isHiddenSpacerForcedShow: taskItem.inAttentionBuiltinAnimation || taskItem.inFastRestoreAnimation
|
||||
isHiddenSpacerAnimated: taskItem.inFastRestoreAnimation
|
||||
|| showWindowAnimation.running
|
||||
isHiddenSpacerForcedShow: taskItem.inAttentionBuiltinAnimation
|
||||
isHiddenSpacerAnimated: showWindowAnimation.running
|
||||
|| root.inActivityChange
|
||||
|| taskItem.inRemoveStage
|
||||
|| (taskItem.containsMouse && inAttentionBuiltinAnimation && taskItem.parabolicItem.zoom!==taskItem.abilities.parabolic.factor.zoom)
|
||||
@ -56,7 +55,7 @@ AbilityItem.BasicItem {
|
||||
|| !hoverEnabled
|
||||
|| !taskItem.abilities.myView.isShownFully
|
||||
|| inAnimation
|
||||
|| (inBlockingAnimation && !(inAttentionBuiltinAnimation || inFastRestoreAnimation))
|
||||
|| (inBlockingAnimation && !inAttentionBuiltinAnimation)
|
||||
parabolicItem.isUpdatingOnlySpacers: inAttentionBuiltinAnimation || inBouncingAnimation
|
||||
|
||||
property alias hoverEnabled: taskMouseArea.hoverEnabled
|
||||
@ -75,7 +74,6 @@ AbilityItem.BasicItem {
|
||||
property bool inAttentionBuiltinAnimation: false
|
||||
property bool inBlockingAnimation: false
|
||||
property bool inBouncingAnimation: false
|
||||
property bool inFastRestoreAnimation: false
|
||||
property bool inNewWindowBuiltinAnimation: false
|
||||
property bool inPopup: false
|
||||
property bool inRemoveStage: false
|
||||
|
@ -1,58 +0,0 @@
|
||||
/*
|
||||
SPDX-FileCopyrightText: 2016 Smith AR <audoban@openmailbox.org>
|
||||
SPDX-FileCopyrightText: 2016 Michail Vourlakos <mvourlakos@gmail.com>
|
||||
SPDX-License-Identifier: GPL-2.0-or-later
|
||||
*/
|
||||
|
||||
import QtQuick 2.0
|
||||
|
||||
import org.kde.plasma.plasmoid 2.0
|
||||
|
||||
///////Restore Zoom Animation/////
|
||||
SequentialAnimation{
|
||||
id: fastRestoreAnimation
|
||||
|
||||
property int speed: 5*taskItem.animationTime
|
||||
|
||||
ScriptAction {
|
||||
script: {
|
||||
taskItem.inFastRestoreAnimation = true;
|
||||
taskItem.inBlockingAnimation = true;
|
||||
}
|
||||
}
|
||||
|
||||
ParallelAnimation {
|
||||
PropertyAnimation {
|
||||
target: taskItem.parabolicItem
|
||||
property: "zoom"
|
||||
to: 1
|
||||
duration: fastRestoreAnimation.speed
|
||||
easing.type: Easing.InCubic
|
||||
}
|
||||
|
||||
PropertyAnimation {
|
||||
target: taskItem.parabolicItem
|
||||
property: "zoomLength"
|
||||
to: 1
|
||||
duration: fastRestoreAnimation.speed
|
||||
easing.type: Easing.InCubic
|
||||
}
|
||||
|
||||
PropertyAnimation {
|
||||
target: taskItem.parabolicItem
|
||||
property: "zoomThickness"
|
||||
to: 1
|
||||
duration: fastRestoreAnimation.speed
|
||||
easing.type: Easing.InCubic
|
||||
}
|
||||
}
|
||||
|
||||
onStopped: {
|
||||
newWindowAnimation.stop();
|
||||
|
||||
taskItem.inBlockingAnimation = false;
|
||||
taskItem.inFastRestoreAnimation = false;
|
||||
// console.log("Fast Restore Animation ended...");
|
||||
}
|
||||
|
||||
}
|
@ -16,6 +16,7 @@ Item{
|
||||
property int speed: 0.9 * taskItem.abilities.animations.speedFactor.current * taskItem.abilities.animations.duration.large
|
||||
|
||||
readonly property bool running: launcherAnimationLoader.item ? launcherAnimationLoader.item.running : false
|
||||
readonly property bool paused: launcherAnimationLoader.active ? launcherAnimationLoader.item.paused : false
|
||||
|
||||
readonly property string needThicknessEvent: launcherAnimation + "_launcher"
|
||||
|
||||
|
@ -21,6 +21,7 @@ Item{
|
||||
property bool inDelayedStartup: false
|
||||
|
||||
readonly property bool running: newWindowAnimationLoader.active ? newWindowAnimationLoader.item.running : false
|
||||
readonly property bool paused: newWindowAnimationLoader.active ? newWindowAnimationLoader.item.paused : false
|
||||
readonly property string needThicknessEvent: newWindowAnimation + "_newwindow"
|
||||
|
||||
Loader {
|
||||
@ -42,8 +43,7 @@ Item{
|
||||
|
||||
onInAttentionChanged:{
|
||||
if (!taskItem.inAttention && newWindowAnimation.running && taskItem.inAttentionBuiltinAnimation) {
|
||||
newWindowAnimation.pause();
|
||||
fastRestoreAnimation.start();
|
||||
clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -55,12 +55,6 @@ Item{
|
||||
taskItem.inNewWindowBuiltinAnimation = false;
|
||||
}
|
||||
|
||||
function pause() {
|
||||
if (running) {
|
||||
newWindowAnimationLoader.item.pause();
|
||||
}
|
||||
}
|
||||
|
||||
function stop() {
|
||||
if (running) {
|
||||
clear();
|
||||
|
@ -8,7 +8,6 @@ import QtQuick 2.0
|
||||
import org.kde.plasma.plasmoid 2.0
|
||||
|
||||
SequentialAnimation{
|
||||
alwaysRunToEnd: true
|
||||
loops: newWindowAnimation.isDemandingAttention ? 20 : 1
|
||||
|
||||
readonly property string bouncePropertyName: taskItem.isVertical ? "iconAnimatedOffsetX" : "iconAnimatedOffsetY"
|
||||
@ -30,14 +29,12 @@ SequentialAnimation{
|
||||
}
|
||||
}
|
||||
|
||||
ParallelAnimation {
|
||||
PropertyAnimation {
|
||||
target: taskItem
|
||||
property: bouncePropertyName
|
||||
to: 0.6 * taskItem.abilities.metrics.iconSize
|
||||
duration: newWindowAnimation.speed
|
||||
easing.type: Easing.OutQuad
|
||||
}
|
||||
PropertyAnimation {
|
||||
target: taskItem
|
||||
property: bouncePropertyName
|
||||
to: 0.6 * taskItem.abilities.metrics.iconSize
|
||||
duration: newWindowAnimation.speed
|
||||
easing.type: Easing.OutQuad
|
||||
}
|
||||
|
||||
PropertyAnimation {
|
||||
|
Loading…
Reference in New Issue
Block a user