[SwipeListItem] Use a real toolbutton to improve usability
ClosedPublic

Authored by ngraham on Sun, Feb 10, 7:22 PM.

Details

Summary

Use a real toolbutton instead of a custom icon + mouse area, which
provides hovered and clicked states automatically and simplifies
the code a bit.

BUG: 403641
FIXED-IN: 5.56

Test Plan

Hovered state:


Pressed state:

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.Sun, Feb 10, 7:22 PM
Restricted Application added a project: Kirigami. · View Herald TranscriptSun, Feb 10, 7:22 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
ngraham requested review of this revision.Sun, Feb 10, 7:22 PM

Overall +1

src/controls/templates/SwipeListItem.qml
281–288

This undefined will just warn on tablet mode. I'd remove it, do we need to specify it? A ToolButton should already behave properly.

282

Should move these values to Units, can be done in a separate patch.

ngraham updated this revision to Diff 51357.Sun, Feb 10, 9:25 PM
ngraham marked an inline comment as done.

Remove unnecessary hoverEnabled property

ngraham added inline comments.Sun, Feb 10, 9:25 PM
src/controls/templates/SwipeListItem.qml
282

Sure, will do that after this lands.

mart accepted this revision.Mon, Feb 11, 3:15 PM
This revision is now accepted and ready to land.Mon, Feb 11, 3:15 PM
This revision was automatically updated to reflect the committed changes.