Don't set width and height in a layout
ClosedPublic

Authored by davidedmundson on Jun 18 2016, 8:41 PM.

Details

Summary

Layouts adjust the size of the children by changing the width and height
replacing our bindings.

implicitWidth is the correct thing to use for layout items

BUG: 360321

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.
davidedmundson retitled this revision from to Don't set width and height in a layout.
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 TranscriptJun 18 2016, 8:41 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
broulik accepted this revision.Jun 18 2016, 10:15 PM
broulik added a reviewer: broulik.
broulik added a subscriber: broulik.

I just noticed I had an uncommited change which tried to solve the same thing:

-                width: units.iconSizes.smallMedium
-                height: width
+                Layout.preferredWidth: units.iconSizes.smallMedium
+                Layout.fillHeight: true

But yours is clearly better.

This revision is now accepted and ready to land.Jun 18 2016, 10:15 PM
This revision was automatically updated to reflect the committed changes.