Compress size hint changes before releasing position and repositioning item.
ClosedPublic

Authored by hein on Aug 18 2017, 11:32 AM.

Details

Summary

D4204 / d7621da69b9b introduced more elaborate handling of item size
hint changes, releasing and repositioning an item for each change to
the min/max hints on either axis. We have applets in which the x and
y hints are coupled and update in turn, to implement aspect-ratio-
preserving resize. This makes the value on an individual axis a
useless temporary, wreaking havoc when followed.

As a poor means to commit size hint changes atomically, a 100ms timer
is used to compress size hint changes. The 100ms interval matches
layoutTimer in main.qml.

Not very happy with this.

Together with D7384 this addresses:
BUG:382759

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.Aug 18 2017, 11:32 AM
Restricted Application added a project: Plasma. · View Herald TranscriptAug 18 2017, 11:32 AM
hein added inline comments.Aug 18 2017, 11:35 AM
containments/desktop/package/contents/ui/AppletAppearance.qml
164

This line was unnecessary, layoutManager.positionItem saves at the end.

mart accepted this revision.Aug 18 2017, 11:38 AM

a timer always makes things more complicated, but..
those sizes should really be updated all at once and since qml doesn't have a way to do it, ok for a timer

This revision is now accepted and ready to land.Aug 18 2017, 11:38 AM
This revision was automatically updated to reflect the committed changes.