mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-28 22:53:09 +00:00
minimize animations
This commit is contained in:
parent
93e16a9ca1
commit
5881d6be92
2 changed files with 22 additions and 2 deletions
|
|
@ -38,13 +38,27 @@ Item {
|
|||
}
|
||||
}
|
||||
|
||||
function syncDelegateGeometry() {
|
||||
let pos = delegate.mapToItem(tasksView, 0, 0);
|
||||
if (window.visible) {
|
||||
tasksModel.requestPublishDelegateGeometry(tasksModel.index(model.index, 0), Qt.rect(pos.x, pos.y, delegate.width, delegate.height), delegate);
|
||||
} else {
|
||||
tasksModel.requestPublishDelegateGeometry(tasksModel.index(model.index, 0), Qt.rect(pos.x, pos.y, delegate.width, delegate.height), dummyWindowTask);
|
||||
}
|
||||
}
|
||||
Connections {
|
||||
target: tasksView
|
||||
onContentYChanged: {
|
||||
var pos = delegate.mapToItem(tasksView, 0, 0);
|
||||
tasksModel.requestPublishDelegateGeometry(tasksModel.index(model.index, 0), Qt.rect(pos.x, pos.y, delegate.width, delegate.height));
|
||||
syncDelegateGeometry();
|
||||
}
|
||||
}
|
||||
Connections {
|
||||
target: window
|
||||
function onVisibleChanged() {
|
||||
syncDelegateGeometry();
|
||||
}
|
||||
}
|
||||
Component.onCompleted: syncDelegateGeometry();
|
||||
|
||||
Item {
|
||||
anchors {
|
||||
|
|
|
|||
|
|
@ -271,4 +271,10 @@ PlasmaCore.ColorScope {
|
|||
}
|
||||
}
|
||||
}
|
||||
//This is to give an animation when the plasma button is pressed
|
||||
Item {
|
||||
id: dummyWindowTask
|
||||
width: Screen.width
|
||||
height: Screen.height
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue