From 5ac346993d9652e569bb63de78b1d65d3b12cd9c Mon Sep 17 00:00:00 2001 From: Zacharias-Brohn Date: Mon, 10 Nov 2025 02:02:49 +0100 Subject: [PATCH] test anims --- Modules/Anim.qml | 4 +- Modules/Launcher.qml | 111 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 113 insertions(+), 2 deletions(-) diff --git a/Modules/Anim.qml b/Modules/Anim.qml index 5f28c6d..05483fb 100644 --- a/Modules/Anim.qml +++ b/Modules/Anim.qml @@ -1,7 +1,7 @@ import QtQuick NumberAnimation { - duration: Appearance.anim.durations.normal + duration: 400 easing.type: Easing.BezierSpline - easing.bezierCurve: Appearance.anim.curves.standard + easing.bezierCurve: MaterialEasing.standard } diff --git a/Modules/Launcher.qml b/Modules/Launcher.qml index 49ee908..bc59320 100644 --- a/Modules/Launcher.qml +++ b/Modules/Launcher.qml @@ -202,6 +202,117 @@ Scope { AppItem { } } + + transitions: Transition { + SequentialAnimation { + ParallelAnimation { + Anim { + target: appListView + property: "opacity" + from: 1 + to: 0 + duration: 200 + easing.bezierCurve: MaterialEasing.standardAccel + } + Anim { + target: appListView + property: "scale" + from: 1 + to: 0.9 + duration: 200 + easing.bezierCurve: MaterialEasing.standardAccel + } + } + PropertyAction { + targets: [model, appListView] + properties: "values,delegate" + } + ParallelAnimation { + Anim { + target: appListView + property: "opacity" + from: 0 + to: 1 + duration: 200 + easing.bezierCurve: MaterialEasing.standardDecel + } + Anim { + target: appListView + property: "scale" + from: 0.9 + to: 1 + duration: 200 + easing.bezierCurve: MaterialEasing.standardDecel + } + } + PropertyAction { + targets: [appListView.add, appListView.remove] + property: "enabled" + value: true + } + } + } + + add: Transition { + enabled: !appListView.state + Anim { + properties: "opacity" + from: 0 + to: 1 + } + + Anim { + properties: "scale" + from: 0.9 + to: 1 + } + } + + remove: Transition { + enabled: !appListView.state + Anim { + properties: "opacity" + from: 1 + to: 0 + } + + Anim { + properties: "scale" + from: 1 + to: 0.9 + } + } + + move: Transition { + Anim { + property: "y" + } + Anim { + properties: "opacity,scale" + to: 1 + } + } + + addDisplaced: Transition { + Anim { + property: "y" + duration: 200 + } + Anim { + properties: "opacity,scale" + to: 1 + } + } + + displaced: Transition { + Anim { + property: "y" + } + Anim { + properties: "opacity,scale" + to: 1 + } + } } } }