taskswitcher: Add task zoom animation

This commit is contained in:
Devin Lin 2022-04-06 20:33:23 -04:00
parent 06b02473d6
commit 3d9b344f52

View file

@ -190,6 +190,22 @@ Item {
color: PlasmaCore.Theme.backgroundColor
clip: true
// scale animation on press (for longer than 50ms)
property real zoomScale: (tapHandler.pressed && tapHandler.timeHeld > 0.05) ? 0.9 : 1
Behavior on zoomScale {
NumberAnimation {
duration: 200
easing.type: Easing.OutExpo
}
}
transform: Scale {
origin.x: appView.width / 2;
origin.y: appView.height / 2;
xScale: appView.zoomScale
yScale: appView.zoomScale
}
Item {
id: item
anchors.fill: parent
@ -216,6 +232,8 @@ Item {
}
TapHandler {
id: tapHandler
cursorShape: Qt.PointingHandCursor
onTapped: delegate.activateApp()
}
}