[SwipeListItem] Use a real toolbutton to improve usability
ClosedPublic

Authored by ngraham on Feb 10 2019, 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.Feb 10 2019, 7:22 PM
Restricted Application added a project: Kirigami. · View Herald TranscriptFeb 10 2019, 7:22 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
ngraham requested review of this revision.Feb 10 2019, 7:22 PM
apol added a subscriber: apol.Feb 10 2019, 8:19 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.Feb 10 2019, 9:25 PM
ngraham marked an inline comment as done.

Remove unnecessary hoverEnabled property

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

Sure, will do that after this lands.

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