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
Please register or sign in to comment