mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-29 07:03:08 +00:00
taskswitcher: Improve zoom animation and add cursor shape on tasks
This commit is contained in:
parent
6830370b55
commit
b905bafcb5
2 changed files with 7 additions and 4 deletions
|
|
@ -39,6 +39,7 @@ QuickSettingsDelegate {
|
|||
id: mouseArea
|
||||
onClicked: root.delegateClick()
|
||||
onPressAndHold: root.delegatePressAndHold()
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
|
||||
PlasmaCore.IconItem {
|
||||
id: icon
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue