From de1604bb71c5ecc09c530dd6e7084241b1e4eaec Mon Sep 17 00:00:00 2001 From: Michail Vourlakos Date: Wed, 26 Feb 2020 18:18:34 +0200 Subject: [PATCH] improve bouncing animation speed for plasma 5.18 --- containment/package/contents/ui/main.qml | 1 + plasmoid/package/contents/ui/main.qml | 7 +++++-- .../contents/ui/task/animations/LauncherAnimation.qml | 2 +- .../contents/ui/task/animations/NewWindowAnimation.qml | 6 +++--- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/containment/package/contents/ui/main.qml b/containment/package/contents/ui/main.qml index 57060a81b..9247c2419 100644 --- a/containment/package/contents/ui/main.qml +++ b/containment/package/contents/ui/main.qml @@ -241,6 +241,7 @@ Item { property bool useThemePanel: noApplets === 0 || !Latte.WindowSystem.compositingActive ? true : (plasmoid.configuration.useThemePanel || plasmoid.configuration.solidBackgroundForMaximized) + property bool plasma515: Latte.WindowSystem.plasmaDesktopVersion >= Latte.WindowSystem.makeVersion(5,15,0) property bool plasma518: Latte.WindowSystem.plasmaDesktopVersion >= Latte.WindowSystem.makeVersion(5,18,0) property alias hoveredIndex: layoutsContainer.hoveredIndex diff --git a/plasmoid/package/contents/ui/main.qml b/plasmoid/package/contents/ui/main.qml index bdf0d74f8..22e5f1e05 100644 --- a/plasmoid/package/contents/ui/main.qml +++ b/plasmoid/package/contents/ui/main.qml @@ -65,7 +65,8 @@ Item { //it is used to check both the applet and the containment for direct render property bool globalDirectRender: latteView ? latteView.globalDirectRender : icList.directRender - property bool plasma515: Latte.WindowSystem.plasmaDesktopVersion >= Latte.WindowSystem.makeVersion(5,14,90) + property bool plasma515: latteView ? latteView.plasma515 : Latte.WindowSystem.plasmaDesktopVersion >= Latte.WindowSystem.makeVersion(5,15,0) + property bool plasma518: latteView ? latteView.plasma518 : Latte.WindowSystem.plasmaDesktopVersion >= Latte.WindowSystem.makeVersion(5,18,0) property bool editMode: latteView ? latteView.editMode : plasmoid.userConfiguring property bool inConfigureAppletsMode: latteView ? latteView.inConfigureAppletsMode : true @@ -242,7 +243,9 @@ Item { property real animationsZoomFactor: latteView ? latteView.animationsZoomFactor : durationTime === 0 ? 1 : 1.65 property real maxZoomFactor: latteView ? latteView.maxZoomFactor : Math.max(zoomFactor, animationsZoomFactor) - property real appliedDurationTime: animationsEnabled ? durationTime : 2 + readonly property real animationsSpeed2: plasma518 ? 1.00 : 2.00 + + property real appliedDurationTime: animationsEnabled ? durationTime : animationsSpeed2 property real durationTime: latteView ? latteView.durationTime : plasmoid.configuration.durationTime property real zoomFactor: latteView ? latteView.zoomFactor : ( 1 + (plasmoid.configuration.zoomLevel / 20) ) diff --git a/plasmoid/package/contents/ui/task/animations/LauncherAnimation.qml b/plasmoid/package/contents/ui/task/animations/LauncherAnimation.qml index 834e50c80..fe4373163 100644 --- a/plasmoid/package/contents/ui/task/animations/LauncherAnimation.qml +++ b/plasmoid/package/contents/ui/task/animations/LauncherAnimation.qml @@ -28,7 +28,7 @@ SequentialAnimation{ id:launcherAnimation property bool launchedAlready: false - property int speed: root.durationTime * 0.8 * units.longDuration + property int speed: root.durationTime * 0.9 * units.longDuration SequentialAnimation{ ScriptAction { diff --git a/plasmoid/package/contents/ui/task/animations/NewWindowAnimation.qml b/plasmoid/package/contents/ui/task/animations/NewWindowAnimation.qml index fadc3dfb4..b10822a85 100644 --- a/plasmoid/package/contents/ui/task/animations/NewWindowAnimation.qml +++ b/plasmoid/package/contents/ui/task/animations/NewWindowAnimation.qml @@ -28,7 +28,7 @@ import org.kde.plasma.core 2.0 as PlasmaCore SequentialAnimation{ id:newWindowAnimation - property int speed: root.appliedDurationTime*units.longDuration + property int speed: root.appliedDurationTime*1.2*units.longDuration property bool isDemandingAttention: taskItem.inAttention property bool containsMouse: taskItem.containsMouse property bool needsThicknessSent: false //flag to check if the signal for thickness was sent @@ -44,7 +44,7 @@ SequentialAnimation{ duration: newWindowAnimation.speed easing.type: Easing.OutQuad - property real thickPercentage: taskItem.inAttentionAnimation ? 1 : 0.6 + property real thickPercentage: taskItem.inAttentionAnimation ? 0.8 : 0.6 } PropertyAnimation { @@ -60,7 +60,7 @@ SequentialAnimation{ target: wrapper property: (icList.orientation == Qt.Vertical) ? "tempScaleWidth" : "tempScaleHeight" to: 1 - duration: 3*root.appliedDurationTime*newWindowAnimation.speed + duration: 4.4*newWindowAnimation.speed easing.type: Easing.OutBounce } }