From 54b69348f4ab8f2303834a118546b5b795000186 Mon Sep 17 00:00:00 2001 From: Sander van Grieken Date: Mon, 3 Oct 2022 17:36:38 +0200 Subject: [PATCH] qml: scroll-drag in history, fix a few more assumptions w.r.t positioning of listview and size of indicator --- electrum/gui/qml/components/History.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/electrum/gui/qml/components/History.qml b/electrum/gui/qml/components/History.qml index 6f541fecc..1df795418 100644 --- a/electrum/gui/qml/components/History.qml +++ b/electrum/gui/qml/components/History.qml @@ -78,7 +78,7 @@ Pane { width: constants.paddingXXLarge drag.target: dragb onPressedChanged: if (pressed) { - dragb.y = mouseY - dragb.height/2 + dragb.y = mouseY + listview.y - dragb.height/2 } } @@ -99,7 +99,7 @@ Pane { listview.contentY = Math.max(listview.originY, Math.min(listview.contentHeight - listview.height + listview.originY, - (y/vdragscroll.height) * listview.contentHeight)) + ((y-listview.y)/(listview.height - dragb.height)) * (listview.contentHeight - listview.height + listview.originY) )) } } Label {