From 685d70c624af1baf66710a9123f7a71afa05e64d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20=C3=81ngel=20San=20Mart=C3=ADn?= Date: Mon, 3 Oct 2022 19:31:44 +0200 Subject: [PATCH] Revert commit to prevent bounce when the wheel mouse is used --- YACReaderLibrary/qml/GridComicsView6.qml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/YACReaderLibrary/qml/GridComicsView6.qml b/YACReaderLibrary/qml/GridComicsView6.qml index 5741986e..86f41494 100644 --- a/YACReaderLibrary/qml/GridComicsView6.qml +++ b/YACReaderLibrary/qml/GridComicsView6.qml @@ -756,6 +756,17 @@ Rectangle { grid.cellWidth = cWidth + Math.floor(rest / wholeCells); } + WheelHandler { + onWheel: { + if (grid.contentHeight <= grid.height) { + return; + } + + var newValue = Math.min((grid.contentHeight - grid.height - (showCurrentComic ? 270 : 20)), (Math.max(grid.originY , grid.contentY - event.angleDelta.y))); + grid.contentY = newValue; + } + } + ScrollBar.vertical: ScrollBar { visible: grid.contentHeight > grid.height