[SwipeListItem] Take into account scrollbar visibility and form factor for…

Authored by ngraham on Jul 19 2019, 5:11 PM.

Description

[SwipeListItem] Take into account scrollbar visibility and form factor for handle and inline actions

Summary:
Right now, SwipeListItem isn't as convergent as it could be. It always uses a very
large margin between actions, and its right margin doesn't take into account the
visibility of the scrollbar, so it's always too much. It also isn't RTL-friendly.

This patch makes the spacing conditional on form factor, takes into account the
scrollbar, and improves RTL friendliness.

Test Plan:
No regressions in Kirigami Gallery list lage

With no scrollbar visible:

With scrollbar visible:

Reviewers: mart, Kirigami

Reviewed By: mart, Kirigami

Subscribers: apol, plasma-devel

Tags: Kirigami

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