SUMMARY If I put a resource usage widget at the right side of my panel, and then right-click to switch alternatives to something else, the widget will be forcibly moved to the left side of the panel. STEPS TO REPRODUCE 1. Put a disk usage widget or similar next to the system tray (right side of the panel). 2. Right-click the widget, select "Show Alternatives", and switch to some other alternative. OBSERVED RESULT The new widget is placed at the left inbetween the application launcher and the desktop pager. EXPECTED RESULT Should stay where I put it. SOFTWARE/OS VERSIONS Operating System: Debian GNU/Linux KDE Plasma Version: 5.23.0 KDE Frameworks Version: 5.86.0 Qt Version: 5.15.2 Kernel Version: 5.14.0-3-amd64 (64-bit) Graphics Platform: X11 Processors: 16 × AMD Ryzen 7 2700 Eight-Core Processor Memory: 15.5 GiB of RAM Graphics Processor: AMD VEGA10 ADDITIONAL INFORMATION
Yes, I can reproduce this. It didn't used to; seems like a regression. Quite annoying.
FWIW this also happens to me on 5.22.5
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/627
Git commit d0479b98b0f0c650e8b57fb5bfba30689b1d80b4 by Nate Graham, on behalf of Alexander Lohnau. Committed on 03/11/2021 at 16:48. Pushed by ngraham into branch 'master'. DRAFT: Fix issues with LayoutManager.insertAtCoordinates The spacing must be multiplied by two in order to get the correct position M +8 -3 containments/panel/contents/ui/LayoutManager.js https://invent.kde.org/plasma/plasma-desktop/commit/d0479b98b0f0c650e8b57fb5bfba30689b1d80b4
Git commit a47ead6339eb516a2d84a102088eb380ae118c8d by Nate Graham, on behalf of Alexander Lohnau. Committed on 03/11/2021 at 16:50. Pushed by ngraham into branch 'Plasma/5.23'. DRAFT: Fix issues with LayoutManager.insertAtCoordinates The spacing must be multiplied by two in order to get the correct position (cherry picked from commit d0479b98b0f0c650e8b57fb5bfba30689b1d80b4) M +8 -3 containments/panel/contents/ui/LayoutManager.js https://invent.kde.org/plasma/plasma-desktop/commit/a47ead6339eb516a2d84a102088eb380ae118c8d
Fix of this bug causes regression: leftmost widgets are moved to the right.
UPD: @ngraham I think your fix was wrong. If widget.width == 0 then widget.x == 0 (QML bug?) and our candidate is inserted after it.
Can you submit a merge request?