Allow for a header outside of the page in a ScrollablePage, with flexible height
AbandonedPublic

Authored by apol on Feb 13 2017, 4:35 PM.

Details

Reviewers
mart
Group Reviewers
Kirigami
Summary

It's a fairly common practice to use flexible headers for lists, this will add a
header that has the implicitHeight by default and will fold it to largeSpacing
once it's scrolled, while keeping the header visible.

Test Plan

Tested on Discover and Kirigami Example

Diff Detail

Repository
R169 Kirigami
Branch
arcpatch-D4599
Lint
No Linters Available
Unit
No Unit Test Coverage
apol updated this revision to Diff 11300.Feb 13 2017, 4:35 PM
apol retitled this revision from to Allow for a header outside of the page in a ScrollablePage, with flexible height.
apol updated this object.
apol edited the test plan for this revision. (Show Details)
apol added reviewers: Kirigami, mart.
Restricted Application added a project: Kirigami. · View Herald TranscriptFeb 13 2017, 4:35 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
apol updated this revision to Diff 11316.Feb 14 2017, 1:32 AM

Remove weird borders

mart edited edge metadata.Feb 14 2017, 11:10 AM

i get only a white empty area where the headers should be?

examples/gallery/contents/ui/gallery/ListViewGallery.qml
21

we can depend only from Qt 5.7, so would be import QtQuick.Controls 2.0

apol marked an inline comment as done.Feb 14 2017, 2:30 PM
apol updated this revision to Diff 11332.Feb 14 2017, 2:30 PM
apol edited edge metadata.

Use the strictly required version of Qt

mart added a comment.Feb 15 2017, 10:21 AM

that's what i get with it: a reserved space, always blank in every page, it was clearly not tested enough.
I don't think is the right way to go about it, i wonder how much is possible to (ab)use the regular header property for pages

mart added a comment.Feb 15 2017, 11:05 AM

stock ListView already has some api to control its own header.
by default it scrolls away, otherwise it can be either fixed or being an hybrid on scrolling away and fixed title ListView.PullBackHeader (the one actually interesting i think, but different apps will need different ones)

https://paste.kde.org/phss79wpo has a behavior very near to this patch, but flicking and scrollbar don't get the erratic behavior they get when you change the actual flickable geometry during drag of either the view directly or the scrollbar.
This without needing additional patches to kirigami. it has a problem of the pull down to refresh breaking, but that should be separately fixed.
i would go that route: put the attached diff in the exampes and fix separately the pull down to refresh

apol abandoned this revision.Feb 15 2017, 11:53 PM

Yep, headerPositioning: ListView.OverlayHeader was what I was looking for, thanks a lot for the hint!