Bug 454517

Summary: Pager applet does not resize correctly after a screen is enabled
Product: [Plasma] plasmashell Reporter: Fushan Wen <qydwhotmail>
Component: Pager widgetAssignee: Plasma Bugs List <plasma-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: hein, nate, victorr2007
Priority: NOR Keywords: regression
Version First Reported In: 5.24.90   
Target Milestone: 1.0   
Platform: openSUSE   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=454095
Latest Commit: Version Fixed In: 5.25
Sentry Crash Report:
Attachments: Before.png
After.png
Panel
Rever view
layout.js file
test_fix1.tar.gz

Description Fushan Wen 2022-05-28 06:28:06 UTC
Created attachment 149279 [details]
Before.png

SUMMARY
If I enable a screen in kscreen kcm, the pager applet does not resize correctly. It overlaps the task manager instead.


STEPS TO REPRODUCE
1. Enable a previously disabled screen in kscreen kcm

OBSERVED RESULT
See Before.png

EXPECTED RESULT
See After.png

SOFTWARE/OS VERSIONS
Regression found in panel refactoring
Comment 1 Fushan Wen 2022-05-28 06:28:24 UTC
Created attachment 149280 [details]
After.png
Comment 3 Nate Graham 2022-06-03 15:53:24 UTC
Git commit d03aa17cd36bdeb8c5d22d04e8137edcf5bcbc82 by Nate Graham, on behalf of Fushan Wen.
Committed on 03/06/2022 at 15:53.
Pushed by ngraham into branch 'master'.

containments/panel: fix Layout binding in `appletContainerComponent`

`lastSpacer` is still required because depending on
implicitWidth/implicitHeight is not reliable as they are usually updated
too late in a layout.
Related: bug 454095
FIXED-IN: 5.25

M  +5    -2    containments/panel/contents/ui/ConfigOverlay.qml
M  +24   -19   containments/panel/contents/ui/main.qml

https://invent.kde.org/plasma/plasma-desktop/commit/d03aa17cd36bdeb8c5d22d04e8137edcf5bcbc82
Comment 4 Nate Graham 2022-06-03 15:54:32 UTC
Git commit c5e6eff14f0f18afbcf51ae372bca68afe22de52 by Nate Graham, on behalf of Fushan Wen.
Committed on 03/06/2022 at 15:54.
Pushed by ngraham into branch 'Plasma/5.25'.

containments/panel: fix Layout binding in `appletContainerComponent`

`lastSpacer` is still required because depending on
implicitWidth/implicitHeight is not reliable as they are usually updated
too late in a layout.
Related: bug 454095
FIXED-IN: 5.25


(cherry picked from commit d03aa17cd36bdeb8c5d22d04e8137edcf5bcbc82)

M  +5    -2    containments/panel/contents/ui/ConfigOverlay.qml
M  +24   -19   containments/panel/contents/ui/main.qml

https://invent.kde.org/plasma/plasma-desktop/commit/c5e6eff14f0f18afbcf51ae372bca68afe22de52
Comment 5 Victor Ryzhykh 2022-06-04 15:54:42 UTC
Created attachment 149458 [details]
Panel

With this change, my view of the panel is broken, and I can no longer customize it. Every time I log in I get this view.
Comment 6 Fushan Wen 2022-06-04 16:00:53 UTC
(In reply to Victor Ryzhykh from comment #5)
> Created attachment 149458 [details]
> Panel
> 
> With this change, my view of the panel is broken, and I can no longer
> customize it. Every time I log in I get this view.

Do you mean the task manager applet is not expanded?
Comment 7 Victor Ryzhykh 2022-06-04 16:28:56 UTC
Created attachment 149461 [details]
Rever view

No, I'm talking about the other one. All the icons on the panel began to shuffle in random order. After each login to the session in different ways. And the order changes from right to left. Reverted that comment and the panel looks like normal again. This is how it looks now, as it was set up.
Comment 8 Victor Ryzhykh 2022-06-04 17:04:45 UTC
Created attachment 149464 [details]
layout.js file

I use this default panel file in /usr/share/plasma/layout-templates/org.kde.plasma.desktop.defaultPanel/contents/layout.js
Comment 9 Fushan Wen 2022-06-04 17:08:26 UTC
Created attachment 149465 [details]
test_fix1.tar.gz

Can you test if the bug is fixed by the 3 files in the archive? Copy them to /usr/share/plasma/plasmoids/org.kde.panel/contents/ui/
Comment 10 Victor Ryzhykh 2022-06-04 17:32:13 UTC
(In reply to Fushan Wen from comment #9)
> Created attachment 149465 [details]
> test_fix1.tar.gz
> 
> Can you test if the bug is fixed by the 3 files in the archive? Copy them to
> /usr/share/plasma/plasmoids/org.kde.panel/contents/ui/

Yes, it works normally now. The panel looks exactly as intended.