From f68f2646f7d019999cc31b302a3f701803e647f6 Mon Sep 17 00:00:00 2001 From: Michail Vourlakos Date: Sun, 31 Jan 2021 01:29:06 +0200 Subject: [PATCH] improve variable name for ParabolicItem --- .../contents/ui/task/ParabolicItem.qml | 20 +++++++++---------- .../task/animations/FastRestoreAnimation.qml | 4 ++-- .../ui/task/animations/LauncherAnimation.qml | 4 ++-- .../ui/task/animations/NewWindowAnimation.qml | 8 ++++---- .../task/animations/RealRemovalAnimation.qml | 4 ++-- .../task/animations/ShowWindowAnimation.qml | 20 +++++++++---------- .../animations/launcher/BounceAnimation.qml | 8 ++++---- .../animations/newwindow/BounceAnimation.qml | 6 +++--- 8 files changed, 36 insertions(+), 38 deletions(-) diff --git a/plasmoid/package/contents/ui/task/ParabolicItem.qml b/plasmoid/package/contents/ui/task/ParabolicItem.qml index 09543a86f..c55689b7f 100644 --- a/plasmoid/package/contents/ui/task/ParabolicItem.qml +++ b/plasmoid/package/contents/ui/task/ParabolicItem.qml @@ -44,16 +44,14 @@ Item{ //scales which are used mainly for activating InLauncher ////Scalers/////// - property bool inTempScaling: ((tempScaleLength !== 1.0) || (tempScaleThickness !== 1.0) ) + property bool inTempScaling: ((zoomLength !== 1.0) || (zoomThickness !== 1.0) ) property real zoom: 1.0 - property real tempScaleWidth: 1.0 - property real tempScaleHeight: 1.0 - property real tempScaleLength: abilityItem.isHorizontal ? tempScaleWidth : tempScaleHeight - property real tempScaleThickness: abilityItem.isHorizontal ? tempScaleHeight : tempScaleWidth + property real zoomLength: 1.0 + property real zoomThickness: 1.0 - property real scaleLength: inTempScaling ? tempScaleLength : zoom - property real scaleThickness: inTempScaling ? tempScaleThickness : zoom + property real scaleLength: inTempScaling ? zoomLength : zoom + property real scaleThickness: inTempScaling ? zoomThickness : zoom property real cleanScalingLength: abilityItem.abilities.metrics.totals.length * zoom property real cleanScalingThickness: abilityItem.abilities.metrics.totals.thickness * zoom @@ -126,12 +124,12 @@ Item{ target: plasmoid onFormFactorChanged:{ parabolicItem.zoom = 1.01; - parabolicItem.tempScaleWidth = 1.01; - parabolicItem.tempScaleHeight = 1.01; + parabolicItem.zoomLength = 1.01; + parabolicItem.zoomThickness = 1.01; parabolicItem.zoom = 1; - parabolicItem.tempScaleWidth = 1; - parabolicItem.tempScaleHeight = 1; + parabolicItem.zoomLength = 1; + parabolicItem.zoomThickness = 1; } } diff --git a/plasmoid/package/contents/ui/task/animations/FastRestoreAnimation.qml b/plasmoid/package/contents/ui/task/animations/FastRestoreAnimation.qml index ab10cdfec..85078ea69 100644 --- a/plasmoid/package/contents/ui/task/animations/FastRestoreAnimation.qml +++ b/plasmoid/package/contents/ui/task/animations/FastRestoreAnimation.qml @@ -46,7 +46,7 @@ SequentialAnimation{ PropertyAnimation { target: taskItem.parabolicItem - property: "tempScaleWidth" + property: "zoomLength" to: 1 duration: fastRestoreAnimation.speed easing.type: Easing.InCubic @@ -54,7 +54,7 @@ SequentialAnimation{ PropertyAnimation { target: taskItem.parabolicItem - property: "tempScaleHeight" + property: "zoomThickness" to: 1 duration: fastRestoreAnimation.speed easing.type: Easing.InCubic diff --git a/plasmoid/package/contents/ui/task/animations/LauncherAnimation.qml b/plasmoid/package/contents/ui/task/animations/LauncherAnimation.qml index 9865e2a18..0d45a9ae9 100644 --- a/plasmoid/package/contents/ui/task/animations/LauncherAnimation.qml +++ b/plasmoid/package/contents/ui/task/animations/LauncherAnimation.qml @@ -90,8 +90,8 @@ Item{ } } - taskItem.parabolicItem.tempScaleWidth = taskItem.parabolicItem.zoom; - taskItem.parabolicItem.tempScaleHeight = taskItem.parabolicItem.zoom; + taskItem.parabolicItem.zoomLength = taskItem.parabolicItem.zoom; + taskItem.parabolicItem.zoomThickness = taskItem.parabolicItem.zoom; } function startLauncherAnimation(){ diff --git a/plasmoid/package/contents/ui/task/animations/NewWindowAnimation.qml b/plasmoid/package/contents/ui/task/animations/NewWindowAnimation.qml index b81f6b752..bfe50444a 100644 --- a/plasmoid/package/contents/ui/task/animations/NewWindowAnimation.qml +++ b/plasmoid/package/contents/ui/task/animations/NewWindowAnimation.qml @@ -53,8 +53,8 @@ Item{ newWindowAnimationLoader.item.loops = 1; newWindowAnimationLoader.item.stop(); - taskItem.parabolicItem.tempScaleWidth = 1; - taskItem.parabolicItem.tempScaleHeight = 1; + taskItem.parabolicItem.zoomLength = 1.0; + taskItem.parabolicItem.zoomThickness = 1.0; taskItem.setBlockingAnimation(false); taskItem.inAttentionAnimation = false; @@ -83,8 +83,8 @@ Item{ taskItem.setBlockingAnimation(true); taskItem.inNewWindowAnimation = true; - taskItem.parabolicItem.tempScaleWidth = taskItem.parabolicItem.zoom; - taskItem.parabolicItem.tempScaleHeight = taskItem.parabolicItem.zoom; + taskItem.parabolicItem.zoomLength = taskItem.parabolicItem.zoom; + taskItem.parabolicItem.zoomThickness = taskItem.parabolicItem.zoom; if(!isDemandingAttention) newWindowAnimationLoader.item.loops = 1; diff --git a/plasmoid/package/contents/ui/task/animations/RealRemovalAnimation.qml b/plasmoid/package/contents/ui/task/animations/RealRemovalAnimation.qml index 6d50c5d18..290ced182 100644 --- a/plasmoid/package/contents/ui/task/animations/RealRemovalAnimation.qml +++ b/plasmoid/package/contents/ui/task/animations/RealRemovalAnimation.qml @@ -163,7 +163,7 @@ SequentialAnimation { PropertyAnimation { target: taskItem.parabolicItem - property: (icList.orientation === Qt.Vertical) ? "tempScaleWidth" : "tempScaleHeight" + property: "zoomThickness" to: 0 duration: taskRealRemovalAnimation.enabledAnimation ? 1.35*showWindowAnimation.speed : 0 easing.type: Easing.InQuad @@ -173,7 +173,7 @@ SequentialAnimation { //smooth move into place the surrounding tasks PropertyAnimation { target: taskItem.parabolicItem - property: (icList.orientation === Qt.Vertical) ? "tempScaleHeight" : "tempScaleWidth" + property: "zoomLength" to: 0 duration: taskRealRemovalAnimation.enabledAnimation ? 1.35*showWindowAnimation.speed : 0 easing.type: Easing.InQuad diff --git a/plasmoid/package/contents/ui/task/animations/ShowWindowAnimation.qml b/plasmoid/package/contents/ui/task/animations/ShowWindowAnimation.qml index 41ed54211..ff4bee301 100644 --- a/plasmoid/package/contents/ui/task/animations/ShowWindowAnimation.qml +++ b/plasmoid/package/contents/ui/task/animations/ShowWindowAnimation.qml @@ -54,7 +54,7 @@ SequentialAnimation{ PropertyAnimation { target: taskItem.parabolicItem - property: (icList.orientation == Qt.Vertical) ? "tempScaleHeight" : "tempScaleWidth" + property: "zoomLength" to: 1 duration: showWindowAnimation.speed easing.type: Easing.OutQuad @@ -64,7 +64,7 @@ SequentialAnimation{ PropertyAnimation { target: taskItem.parabolicItem - property: (icList.orientation == Qt.Vertical) ? "tempScaleWidth" : "tempScaleHeight" + property: "zoomThickness" to: 1 duration: showWindowAnimation.speed easing.type: Easing.OutQuad @@ -153,16 +153,16 @@ SequentialAnimation{ if (hideWindow) { isForcedHidden = true; taskItem.visible = false; - taskItem.parabolicItem.tempScaleWidth = 0; - taskItem.parabolicItem.tempScaleHeight = 0; + taskItem.parabolicItem.zoomLength = 0.0; + taskItem.parabolicItem.zoomThickness = 0.0; taskItem.parabolicItem.opacity = 0; taskItem.inAnimation = false; } else if (!LatteCore.WindowSystem.compositingActive || root.inDraggingPhase || taskItem.isSeparator) { isForcedHidden = false; taskItem.visible = true; - taskItem.parabolicItem.tempScaleWidth = 1; - taskItem.parabolicItem.tempScaleHeight = 1; + taskItem.parabolicItem.zoomLength = 1.0; + taskItem.parabolicItem.zoomThickness = 1.0; taskItem.parabolicItem.zoom = 1; taskItem.parabolicItem.opacity = 1; taskItem.inAnimation = false; @@ -170,8 +170,8 @@ SequentialAnimation{ && (taskItem.abilities.animations.speedFactor.current !== 0) && !launcherIsAlreadyShown){ isForcedHidden = false; taskItem.visible = true; - taskItem.parabolicItem.tempScaleWidth = 0; - taskItem.parabolicItem.tempScaleHeight = 0; + taskItem.parabolicItem.zoomLength = 0.0; + taskItem.parabolicItem.zoomThickness = 0.0; start(); } else { isForcedHidden = false; @@ -181,8 +181,8 @@ SequentialAnimation{ taskItem.parabolicItem.zoom = frozenTask.zoom; tasksExtendedManager.removeFrozenTask(taskItem.launcherUrl); } else { - taskItem.parabolicItem.tempScaleWidth = 1; - taskItem.parabolicItem.tempScaleHeight = 1; + taskItem.parabolicItem.zoomLength = 1.0; + taskItem.parabolicItem.zoomThickness = 1.0; } //! by enabling it we break the bouncing animation diff --git a/plasmoid/package/contents/ui/task/animations/launcher/BounceAnimation.qml b/plasmoid/package/contents/ui/task/animations/launcher/BounceAnimation.qml index 31d7c2034..0d71f4b68 100644 --- a/plasmoid/package/contents/ui/task/animations/launcher/BounceAnimation.qml +++ b/plasmoid/package/contents/ui/task/animations/launcher/BounceAnimation.qml @@ -35,7 +35,7 @@ SequentialAnimation{ ParallelAnimation{ PropertyAnimation { target: taskItem.parabolicItem - property: (icList.orientation == Qt.Vertical) ? "tempScaleWidth" : "tempScaleHeight" + property: "zoomThickness" to: taskItem.containsMouse ? 1+2*(taskItem.abilities.parabolic.factor.maxZoom-1) : 1 + (1.5 * (taskItem.abilities.parabolic.factor.maxZoom-1)) duration: launcherAnimation.speed easing.type: Easing.OutQuad @@ -43,7 +43,7 @@ SequentialAnimation{ PropertyAnimation { target: taskItem.parabolicItem - property: (icList.orientation == Qt.Horizontal) ? "tempScaleWidth" : "tempScaleHeight" + property: "zoomLength" to: 1 duration: launcherAnimation.speed easing.type: Easing.OutQuad @@ -52,7 +52,7 @@ SequentialAnimation{ PropertyAnimation { target: taskItem.parabolicItem - property: (icList.orientation === Qt.Vertical) ? "tempScaleWidth" : "tempScaleHeight" + property: "zoomThickness" to: 1 duration: 4*launcherAnimation.speed easing.type: Easing.OutBounce @@ -61,7 +61,7 @@ SequentialAnimation{ ParallelAnimation{ PropertyAnimation { target: taskItem.parabolicItem - property: (icList.orientation === Qt.Vertical) ? "tempScaleHeight" : "tempScaleWidth" + property: "zoomLength" to: 1 duration: taskItem.abilities.animations.speedFactor.current*launcherAnimation.speed easing.type: Easing.OutBounce diff --git a/plasmoid/package/contents/ui/task/animations/newwindow/BounceAnimation.qml b/plasmoid/package/contents/ui/task/animations/newwindow/BounceAnimation.qml index c9a91bb2b..ed405adf6 100644 --- a/plasmoid/package/contents/ui/task/animations/newwindow/BounceAnimation.qml +++ b/plasmoid/package/contents/ui/task/animations/newwindow/BounceAnimation.qml @@ -27,7 +27,7 @@ SequentialAnimation{ ParallelAnimation{ PropertyAnimation { target: taskItem.parabolicItem - property: (icList.orientation == Qt.Vertical) ? "tempScaleWidth" : "tempScaleHeight" + property: "zoomThickness" to: 1 + (thickPercentage * 2 * (taskItem.abilities.animations.requirements.zoomFactor-1)) duration: newWindowAnimation.speed easing.type: Easing.OutQuad @@ -37,7 +37,7 @@ SequentialAnimation{ PropertyAnimation { target: taskItem.parabolicItem - property: (icList.orientation == Qt.Horizontal) ? "tempScaleWidth" : "tempScaleHeight" + property: "zoomLength" to: 1 duration: newWindowAnimation.speed easing.type: Easing.OutQuad @@ -46,7 +46,7 @@ SequentialAnimation{ PropertyAnimation { target: taskItem.parabolicItem - property: (icList.orientation == Qt.Vertical) ? "tempScaleWidth" : "tempScaleHeight" + property: "zoomThickness" to: 1 duration: 4.4*newWindowAnimation.speed easing.type: Easing.OutBounce