Save an object per panel applet
ClosedPublic

Authored by hein on Dec 3 2017, 5:30 PM.

Details

Summary

Instead of Item { Loader {} } just make the applet
container the Loader. Also saves some prop bindings
for sizing and centering the BusyIndicator, which
still appears correct.

Some props marked read-only as a bonus.

Diff Detail

Repository
R119 Plasma Desktop
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
hein created this revision.Dec 3 2017, 5:30 PM
Restricted Application added a project: Plasma. · View Herald TranscriptDec 3 2017, 5:30 PM
hein requested review of this revision.Dec 3 2017, 5:30 PM

In general +1.
A comment at the top of Loader making it clear it's not a loader for the applet would help.

containments/panel/contents/ui/main.qml
294

In the old code this was the size of the applet
Now it's the implicit size of busy indicator.

Might be a problem for tiny panels

davidedmundson accepted this revision.Dec 3 2017, 5:49 PM
This revision is now accepted and ready to land.Dec 3 2017, 5:49 PM
mart accepted this revision.Dec 3 2017, 5:50 PM
hein added a comment.Dec 3 2017, 5:50 PM

Will add a comment, the sizing thing isn't a problem because the Loader resizes the BusyIndicator.

This revision was automatically updated to reflect the committed changes.
broulik added a subscriber: broulik.Dec 4 2017, 2:30 PM
broulik added inline comments.
containments/panel/contents/ui/main.qml
282

This property is being assigned to, it cannot be readonly.

313

For example here

hein added a comment.Dec 4 2017, 2:32 PM

Ooops, fixing.