mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-08-03 18:24:46 +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 {
|
Connections {
|
||||||
target: tasksView
|
target: tasksView
|
||||||
onContentYChanged: {
|
onContentYChanged: {
|
||||||
var pos = delegate.mapToItem(tasksView, 0, 0);
|
syncDelegateGeometry();
|
||||||
tasksModel.requestPublishDelegateGeometry(tasksModel.index(model.index, 0), Qt.rect(pos.x, pos.y, delegate.width, delegate.height));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Connections {
|
||||||
|
target: window
|
||||||
|
function onVisibleChanged() {
|
||||||
|
syncDelegateGeometry();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Component.onCompleted: syncDelegateGeometry();
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
anchors {
|
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