Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 5881d6be authored by Marco Martin's avatar Marco Martin

minimize animations

parent 93e16a9c
......@@ -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
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment