From f6cec0bcdb2f7ae6e7c4efd0577f79f91167a310 Mon Sep 17 00:00:00 2001 From: miruka Date: Fri, 14 Feb 2020 10:24:42 -0400 Subject: [PATCH] Half-fix main pane scrolling? --- src/gui/MainPane/AccountRoomsList.qml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/gui/MainPane/AccountRoomsList.qml b/src/gui/MainPane/AccountRoomsList.qml index 4d41dea6..59dd2f30 100644 --- a/src/gui/MainPane/AccountRoomsList.qml +++ b/src/gui/MainPane/AccountRoomsList.qml @@ -35,7 +35,7 @@ HListView { color: theme.controls.listView.highlight - Behavior on y { HNumberAnimation {} } + Behavior on y { HNumberAnimation { id: yAnimation } } Behavior on height { HNumberAnimation {} } Binding { @@ -43,11 +43,14 @@ HListView { property: "contentY" value: Math.max( 0, - highlightRectangle.y + highlightRectangle.height / 2 - - mainPaneList.height / 2, + Math.min( + mainPaneList.contentHeight - mainPaneList.height, + highlightRectangle.y + highlightRectangle.height / 2 - + mainPaneList.height / 2, + ), ) - when: ! mainPaneList.horizontalOvershoot delayed: true + when: yAnimation.running } }