Setting a sensible minimum size for plasmawindowed
ClosedPublic

Authored by mart on Mar 29 2017, 10:09 AM.

Details

Summary

plasmawindowed didn't set any minimum size to its window,
so it could be resized unusably small.
it tried to find its attached Layout, but the attached property
object wasn't created.
now set the minimum size by the following heiristics:

  • if there is a switchsize, set it to switch to full representation
  • then take the full representation minimum size if available and bigger then switch size
  • otherwise, set it as SizeEnormous icon size
  • in any case, don't let the window be less than that

BUG:376277

Test Plan

tried both an applet that exports a layout and ful lrepresentation (kickoff)
and an applet that wants to stay collapsed (analog clock) kickoff
stays expanded at a reasonable minimum size, the clock can be scaled down
to 128x128

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.
mart created this revision.Mar 29 2017, 10:09 AM
Restricted Application added a project: Plasma. · View Herald TranscriptMar 29 2017, 10:09 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
mart updated this revision to Diff 12952.Mar 29 2017, 10:49 AM
  • access switchSize in minimumWidthChanged
broulik accepted this revision.Mar 29 2017, 11:37 AM
broulik added a subscriber: broulik.

Not super pretty, especially emitting min size changed on every resize event but works nicely.

This revision is now accepted and ready to land.Mar 29 2017, 11:37 AM
This revision was automatically updated to reflect the committed changes.