Half-fix main pane scrolling?

This commit is contained in:
miruka 2020-02-14 10:24:42 -04:00
parent 7325c78c5a
commit f6cec0bcdb

View File

@ -35,7 +35,7 @@ HListView {
color: theme.controls.listView.highlight color: theme.controls.listView.highlight
Behavior on y { HNumberAnimation {} } Behavior on y { HNumberAnimation { id: yAnimation } }
Behavior on height { HNumberAnimation {} } Behavior on height { HNumberAnimation {} }
Binding { Binding {
@ -43,11 +43,14 @@ HListView {
property: "contentY" property: "contentY"
value: Math.max( value: Math.max(
0, 0,
highlightRectangle.y + highlightRectangle.height / 2 - Math.min(
mainPaneList.height / 2, mainPaneList.contentHeight - mainPaneList.height,
highlightRectangle.y + highlightRectangle.height / 2 -
mainPaneList.height / 2,
),
) )
when: ! mainPaneList.horizontalOvershoot
delayed: true delayed: true
when: yAnimation.running
} }
} }