mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-08-02 17:54:45 +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
|
id: mouseArea
|
||||||
onClicked: root.delegateClick()
|
onClicked: root.delegateClick()
|
||||||
onPressAndHold: root.delegatePressAndHold()
|
onPressAndHold: root.delegatePressAndHold()
|
||||||
|
cursorShape: Qt.PointingHandCursor
|
||||||
|
|
||||||
PlasmaCore.IconItem {
|
PlasmaCore.IconItem {
|
||||||
id: icon
|
id: icon
|
||||||
|
|
|
||||||
|
|
@ -59,11 +59,14 @@ Item {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Item {
|
MouseArea {
|
||||||
id: control
|
id: control
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: parent.height
|
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 bool movingUp: false
|
||||||
property real oldY: y
|
property real oldY: y
|
||||||
onYChanged: {
|
onYChanged: {
|
||||||
|
|
@ -75,7 +78,6 @@ Item {
|
||||||
DragHandler {
|
DragHandler {
|
||||||
id: dragHandler
|
id: dragHandler
|
||||||
target: parent
|
target: parent
|
||||||
cursorShape: Qt.PointingHandCursor
|
|
||||||
|
|
||||||
yAxis.enabled: true
|
yAxis.enabled: true
|
||||||
xAxis.enabled: false
|
xAxis.enabled: false
|
||||||
|
|
@ -191,8 +193,8 @@ Item {
|
||||||
color: PlasmaCore.Theme.backgroundColor
|
color: PlasmaCore.Theme.backgroundColor
|
||||||
clip: true
|
clip: true
|
||||||
|
|
||||||
// scale animation on press (for longer than 50ms)
|
// scale animation on press
|
||||||
property real zoomScale: (tapHandler.pressed && tapHandler.timeHeld > 0.05) ? 0.9 : 1
|
property real zoomScale: tapHandler.pressed ? 0.9 : 1
|
||||||
Behavior on zoomScale {
|
Behavior on zoomScale {
|
||||||
NumberAnimation {
|
NumberAnimation {
|
||||||
duration: 200
|
duration: 200
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue