Recommend better width calculation for PlaceholderMessage
ClosedPublic

Authored by ngraham on May 12 2020, 7:25 PM.

Details

Summary

Left and right anchors + margins + vertical centering don't work well work together, and
the text overflows instead of wrapping. Setting the center anchor and defining a width
works much better. Also recommend larger margins by default as this looks nicer.

I don't want to define a default width and alignment in the component itself that uses
anchors and references parent, since it may be inside a layout rather than being the
child of a ListView or something.

Test Plan

Literally none, it's a documentation improvement. The recommended code works though.

Diff Detail

Repository
R169 Kirigami
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
ngraham created this revision.May 12 2020, 7:25 PM
Restricted Application added a project: Kirigami. · View Herald TranscriptMay 12 2020, 7:25 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
ngraham requested review of this revision.May 12 2020, 7:25 PM
ngraham edited the summary of this revision. (Show Details)May 12 2020, 7:27 PM
cblack accepted this revision.May 12 2020, 7:28 PM
This revision is now accepted and ready to land.May 12 2020, 7:28 PM
ngraham edited the test plan for this revision. (Show Details)May 12 2020, 7:29 PM