mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-04-17 03:02:05 -04:00
dms: Material Animation Refactor
- Thanks Google for Material 3 Expressive stuffs - Thanks Caelestia shell for pushing qml limits to showcase the blueprint
This commit is contained in:
60
quickshell/Common/ListViewTransitions.qml
Normal file
60
quickshell/Common/ListViewTransitions.qml
Normal file
@@ -0,0 +1,60 @@
|
||||
pragma Singleton
|
||||
import QtQuick
|
||||
import qs.Common
|
||||
|
||||
// Reusable ListView/GridView transitions
|
||||
QtObject {
|
||||
id: root
|
||||
|
||||
readonly property Transition add: Transition {
|
||||
ParallelAnimation {
|
||||
DankAnim {
|
||||
property: "opacity"
|
||||
from: 0
|
||||
to: 1
|
||||
duration: Theme.expressiveDurations.expressiveDefaultSpatial
|
||||
easing.bezierCurve: Theme.expressiveCurves.emphasizedDecel
|
||||
}
|
||||
DankAnim {
|
||||
property: "scale"
|
||||
from: 0.92
|
||||
to: 1
|
||||
duration: Theme.expressiveDurations.expressiveDefaultSpatial
|
||||
easing.bezierCurve: Theme.expressiveCurves.emphasizedDecel
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
readonly property Transition remove: Transition {
|
||||
ParallelAnimation {
|
||||
DankAnim {
|
||||
property: "opacity"
|
||||
to: 0
|
||||
duration: Theme.expressiveDurations.fast
|
||||
easing.bezierCurve: Theme.expressiveCurves.emphasizedAccel
|
||||
}
|
||||
DankAnim {
|
||||
property: "scale"
|
||||
to: 0.92
|
||||
duration: Theme.expressiveDurations.fast
|
||||
easing.bezierCurve: Theme.expressiveCurves.emphasizedAccel
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
readonly property Transition displaced: Transition {
|
||||
DankAnim {
|
||||
properties: "x,y"
|
||||
duration: Theme.expressiveDurations.expressiveDefaultSpatial
|
||||
easing.bezierCurve: Theme.expressiveCurves.expressiveDefaultSpatial
|
||||
}
|
||||
}
|
||||
|
||||
readonly property Transition move: Transition {
|
||||
DankAnim {
|
||||
properties: "x,y"
|
||||
duration: Theme.expressiveDurations.expressiveDefaultSpatial
|
||||
easing.bezierCurve: Theme.expressiveCurves.standard
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user