mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-08-02 09:48:50 +00:00
taskswitcher: Add task zoom animation
This commit is contained in:
parent
06b02473d6
commit
3d9b344f52
1 changed files with 18 additions and 0 deletions
|
|
@ -190,6 +190,22 @@ Item {
|
||||||
color: PlasmaCore.Theme.backgroundColor
|
color: PlasmaCore.Theme.backgroundColor
|
||||||
clip: true
|
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 {
|
Item {
|
||||||
id: item
|
id: item
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
@ -216,6 +232,8 @@ Item {
|
||||||
}
|
}
|
||||||
|
|
||||||
TapHandler {
|
TapHandler {
|
||||||
|
id: tapHandler
|
||||||
|
cursorShape: Qt.PointingHandCursor
|
||||||
onTapped: delegate.activateApp()
|
onTapped: delegate.activateApp()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue