It feels like I'm the only one posting things like this here... should this go somewhere else?
Same situation as usual. I have a ListView that's in a ScrollablePage. If I click/tap on the name of that page in the header, we scroll to the top. Makes sense - except that our scroll ends at a different spot compared to when we drag the list to the top (or drag beyond the overshoot and let go). The latter always appears to have the top item aligned with the header, but when I tap on the header and have scrollTopAnimation run to: 0, then the header overlaps the top element in the ListView. A patch like this seems to fix the problem
From caf268d4378c9e365f13014e2240ada574c8487b Mon Sep 17 00:00:00 2001 From: Dirk Hohndel <d...@hohndel.org> Date: Tue, 19 Apr 2016 13:56:31 -0700 Subject: [PATCH] Don't overlap header and page when scrolling to top on header tap This seems fragile but at least for us it seems to consistently work. Signed-off-by: Dirk Hohndel <d...@hohndel.org> --- src/qml/ApplicationHeader.qml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/qml/ApplicationHeader.qml b/src/qml/ApplicationHeader.qml index 9abc212..8873ef6 100644 --- a/src/qml/ApplicationHeader.qml +++ b/src/qml/ApplicationHeader.qml @@ -212,7 +212,10 @@ Rectangle { onClicked: { //scroll up if current otherwise make current if (__appWindow.pageStack.currentIndex == model.index) { - scrollTopAnimation.running = true; + if (__appWindow.pageStack.currentItem.flickable.contentY > -__appWindow.header.height) { + scrollTopAnimation.to = -__appWindow.header.height + scrollTopAnimation.running = true; + } } else { __appWindow.pageStack.currentIndex = model.index; } -- 2.6.4 (Apple Git-63)
_______________________________________________ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel