Allow PlaceholderMessage to be text-less
ClosedPublic

Authored by ngraham on Apr 24 2020, 1:43 PM.

Details

Summary

Requested by @iasensio for the KWin Rules KCM patch (D29141). Could be useful for other
uses too, e.g. an app loading screen where you would define an icon and a custom progress
bar, but wouldn't need text.

Test Plan

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.Apr 24 2020, 1:43 PM
Restricted Application added a project: Kirigami. · View Herald TranscriptApr 24 2020, 1:43 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
ngraham requested review of this revision.Apr 24 2020, 1:43 PM
broulik added inline comments.
src/controls/PlaceholderMessage.qml
220

text is a string property and as such always present, you can simplify this to

visible: text !== ""

or

visible: text.length > 0
ngraham updated this revision to Diff 81097.Apr 24 2020, 2:16 PM
ngraham marked an inline comment as done.

Simplify

iasensio accepted this revision.Apr 24 2020, 2:18 PM
This revision is now accepted and ready to land.Apr 24 2020, 2:18 PM
This revision was automatically updated to reflect the committed changes.