Verified Commit 0fc8d031 authored by Fushan Wen's avatar Fushan Wen 💬
Browse files

Revert "applets/taskmanager: use layoutTimer to update layout"

Fixes a visual glitch when opening a pinned application.

This reverts commit 1e522274.

CCBUG: 431615
parent 56dbb54b
Pipeline #207269 passed with stage
in 2 minutes and 40 seconds
......@@ -356,7 +356,7 @@ MouseArea {
tasksModel.groupingLauncherUrlBlacklist = plasmoid.configuration.groupingLauncherUrlBlacklist;
}
function onIconSpacingChanged() {
layoutTimer.restart();
taskList.layout();
}
}
......@@ -449,27 +449,31 @@ MouseArea {
onWidthChanged: layoutTimer.restart()
onHeightChanged: layoutTimer.restart()
function layout() {
LayoutManager.layout(taskRepeater);
}
Timer {
id: layoutTimer
interval: PlasmaCore.Units.longDuration // Same as animation
interval: 0
repeat: false
onTriggered: LayoutManager.layout(taskRepeater)
onTriggered: taskList.layout()
}
Repeater {
id: taskRepeater
delegate: Task {}
onItemAdded: layoutTimer.restart()
onItemAdded: taskList.layout()
onItemRemoved: {
if (tasks.containsMouse && index != taskRepeater.count &&
item.winIdList && item.winIdList.length > 0 &&
taskClosedWithMouseMiddleButton.indexOf(item.winIdList[0]) > -1) {
needLayoutRefresh = true;
} else {
layoutTimer.restart();
taskList.layout();
}
taskClosedWithMouseMiddleButton = [];
}
......
Supports Markdown
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