taskswitcher: Improve zoom animation and add cursor shape on tasks

This commit is contained in:
Devin Lin 2022-04-06 22:08:47 -04:00
parent 6830370b55
commit b905bafcb5
2 changed files with 7 additions and 4 deletions

View file

@ -39,6 +39,7 @@ QuickSettingsDelegate {
id: mouseArea
onClicked: root.delegateClick()
onPressAndHold: root.delegatePressAndHold()
cursorShape: Qt.PointingHandCursor
PlasmaCore.IconItem {
id: icon

View file

@ -59,11 +59,14 @@ Item {
}
}
Item {
MouseArea {
id: control
width: parent.width
height: parent.height
// set cursor shape here, since taphandler seems to not be able to do it
cursorShape: Qt.PointingHandCursor
property bool movingUp: false
property real oldY: y
onYChanged: {
@ -75,7 +78,6 @@ Item {
DragHandler {
id: dragHandler
target: parent
cursorShape: Qt.PointingHandCursor
yAxis.enabled: true
xAxis.enabled: false
@ -191,8 +193,8 @@ 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
// scale animation on press
property real zoomScale: tapHandler.pressed ? 0.9 : 1
Behavior on zoomScale {
NumberAnimation {
duration: 200