Skip to content
Commit 2b02a185 authored by Fushan Wen's avatar Fushan Wen
Browse files

Panel: fix widgets being arranged in wrong order in new panel

After Plasmoids are ported to PlasmoidItem, `checkLastSpacer()` can detect
the Layout properties of a widget immediately after a new panel is added.
The task manager widget sets `Layout.fillWidth: true` in horizontal panels, so
after the task manager widget is added to panel, `hasSpacer` will become
true, and `lastSpacer` will become invisible, making `layout.childAt`
unable to locate any item because QQuickItem::childAt will ignore
invisible items.

This adds a new visible condition to `lastSpacer`. When lastSpacer's
width is equal to currentLayout's width, it means all widgets are still
being loaded in a new panel, so `lastSpacer` should still keep visible
to make `layout.childAt` able to find it.

BUG: 470927
FIXED-IN: 6.0
parent f48698f8
Pipeline #459633 passed with stage
in 3 minutes and 23 seconds
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