possible to use OverlaySheet with ListView
ClosedPublic

Authored by mart on Aug 25 2016, 4:06 PM.

Details

Summary

by setting a ListView (or a GridView) as the mainItem
of an OverlaySheet, it uses it instead of an internal Flickable
due to limitations of ListView, in that case it always takes 100% of the
page width

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.
mart updated this revision to Diff 6275.Aug 25 2016, 4:06 PM
mart retitled this revision from to possible to use OverlaySheet with ListView.
mart updated this object.
mart edited the test plan for this revision. (Show Details)
Restricted Application added a project: Kirigami. · View Herald TranscriptAug 25 2016, 4:06 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
apol edited edge metadata.Sep 7 2016, 2:33 PM
apol added a subscriber: colomar.

We've been looking into it with @colomar and we like how it works. We think it would be useful if we'd get a small margin on either side so that it's easy to close when we're half-way through the scrolling process.

Other than that, +1

mart added a comment.Sep 9 2016, 9:48 AM
In D2580#50121, @apol wrote:

We've been looking into it with @colomar and we like how it works. We think it would be useful if we'd get a small margin on either side so that it's easy to close when we're half-way through the scrolling process.

Other than that, +1

as i explained, on the case of a listview, i can't make it narrower than the page, because of how listview works, i can't have the touch sensitive area being wider then the list itself, so clicking outside the list on the sides wouldn't dismiss it, while it would when clicking on top or bottom (it's structural in the ListView c++ stuff, so belongs on the "don't even try" category).

apol added a comment.Sep 12 2016, 2:07 PM
In D2580#50546, @mart wrote:
In D2580#50121, @apol wrote:

We've been looking into it with @colomar and we like how it works. We think it would be useful if we'd get a small margin on either side so that it's easy to close when we're half-way through the scrolling process.

Other than that, +1

as i explained, on the case of a listview, i can't make it narrower than the page, because of how listview works, i can't have the touch sensitive area being wider then the list itself, so clicking outside the list on the sides wouldn't dismiss it, while it would when clicking on top or bottom (it's structural in the ListView c++ stuff, so belongs on the "don't even try" category).

But this makes the sheet become rather hard to dismiss. I'd say let's get this in, as the current component just breaks awkwardly, and then we'll see how to make it usable, possibly from the application itself.

apol accepted this revision.Sep 12 2016, 2:07 PM
apol edited edge metadata.
This revision is now accepted and ready to land.Sep 12 2016, 2:07 PM

There is always still the possibility to use one of the Action Buttons as a close button (as shown in the Gallery) if it gets too long to easily swipe away.

There is always still the possibility to use one of the Action Buttons as a close button (as shown in the Gallery) if it gets too long to easily swipe away.

mart added a comment.Sep 12 2016, 3:58 PM

i could try to hack there mouseareas that would dismiss and move the listview to make it look as the flickable is whole (probably no actual flicking tough)
it would be a lot of very ugly qml logic, but maybe could work

This revision was automatically updated to reflect the committed changes.