Fix panel spacer
ClosedPublic

Authored by davidedmundson on Sep 15 2016, 1:04 AM.

Details

Summary

An expanding spacer had it's minimum size set to the config.length
Allowing the panel to go from config size to infinite.

The problem is the panel length effectively defaults to the size the
spacer starts at (it gets set when we drag it into the right place)
meaning it starts off huge and can never shrink. This then leads to
applets being pushed off the panel.

We want it to be in expanding mode from 0 to config.length
and non expanding to ideally be a fixed width - though still probably
compress if it would otherwise mean the applets would overflow.

Setting the preferred size does all that implicitly; and also sets the
appropriate hint so you can have a spacer in a flexible width panel
correctly.

BUG: 352651

Diff Detail

Repository
R120 Plasma Workspace
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
davidedmundson retitled this revision from to Fix panel spacer.
davidedmundson updated this object.
davidedmundson edited the test plan for this revision. (Show Details)
davidedmundson added a reviewer: Plasma.
Restricted Application added a project: Plasma. · View Herald TranscriptSep 15 2016, 1:04 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
mart accepted this revision.Sep 15 2016, 8:58 AM
mart added a reviewer: mart.
mart added a subscriber: mart.
mart added inline comments.
applets/panelspacer/contents/ui/main.qml
36–37

some time ago on old qt releases i noticed that the layouts ignored items with one of the sizes as 0 (even height for an horizontal one) does it work now?

This revision is now accepted and ready to land.Sep 15 2016, 8:58 AM

some time ago on old qt releases i noticed that the layouts ignored items with one of the sizes as 0 (even height for an horizontal one) does it work now?

I didn't notice any problems, is there anything specific I can test?

This revision was automatically updated to reflect the committed changes.