Make BasicListItem more useful by giving it a subtitle property

Authored by ngraham on Apr 21 2020, 10:25 PM.

Description

Make BasicListItem more useful by giving it a subtitle property

Summary:
Right now BasicListItem is quite limited and therefore not very useful.

We have this paradigm *all over the place* of a double-height list item with an
icon, a title, and a smaller/lighter subtitle below it. Right now neither
BasicListItem nor SwipeListItem supports this natively, so wherever we use this,
we have to manufacture it by hand, leading to every implementation looking
inconsistent. That seems like a shame.

This patch addresses that situation by adding support for this paradigm to
BasicListItem, which is given a subtitle property that will display a second
label in a smaller, lighter font below the title label (I did not use level 4
and 5 Headings because this would result in an appearance change for list
items without subtitles, as the level 4 Heading is larger than the Label).
It is also changed to be allowed to not display an icon, which is more common
with title+subtitle list items.

Then a BasicListItem can be used as the contentItem for SwipeListItems,
producing the desired visual consistency wherever we use either of the list
items.

Test Plan:
Test with D29075:

No visual or behavioral changes for BasicListItems not using subtitles

Open Kirigami gallery or Discover. No visual changes there

Reviewers: VDG, Kirigami, mart

Reviewed By: VDG, Kirigami, mart

Subscribers: cblack, plasma-devel

Tags: Kirigami

Differential Revision: https://phabricator.kde.org/D29074

Details

Committed
ngrahamApr 30 2020, 3:20 PM
Reviewer
VDG
Differential Revision
D29074: Make BasicListItem more useful by giving it a subtitle property
Parents
R169:8a65fcefe42d: Bundle icons for inline messages
Branches
Unknown
Tags
Unknown