From 4189acaa5a468f93d44a4f1b52e6f655c069998e Mon Sep 17 00:00:00 2001 From: Lucas Palumbo <130711113+Luke-239@users.noreply.github.com> Date: Sun, 16 Aug 2026 19:14:38 -0400 Subject: [PATCH] Update GridComicsView.qml Fix extremely slow mouse wheel scrolling in grid view on Linux Wayland --- YACReaderLibrary/qml/GridComicsView.qml | 38 ++++++++++++++++--------- 1 file changed, 24 insertions(+), 14 deletions(-) diff --git a/YACReaderLibrary/qml/GridComicsView.qml b/YACReaderLibrary/qml/GridComicsView.qml index abf00b47f..b4daba457 100644 --- a/YACReaderLibrary/qml/GridComicsView.qml +++ b/YACReaderLibrary/qml/GridComicsView.qml @@ -533,14 +533,19 @@ SplitView { currentIndexHelper.setGridColumnCount(wholeCells) } - WheelHandler { - onWheel: { - if (grid.contentHeight <= grid.height) { - return; - } + MouseArea { + anchors.fill: parent + acceptedButtons: Qt.NoButton - var newValue = Math.min((grid.contentHeight - grid.height + grid.originY), (Math.max(grid.originY , grid.contentY - event.angleDelta.y))); - grid.contentY = newValue; + onWheel: (wheel) => { + if (grid.contentHeight <= grid.height) + return + + var newValue = Math.min( + (grid.contentHeight - grid.height + grid.originY), + Math.max(grid.originY, grid.contentY - wheel.angleDelta.y) + ) + grid.contentY = newValue } } @@ -732,14 +737,19 @@ SplitView { EmptyInfoView { width: infoView.width } } - WheelHandler { - onWheel: { - if (infoFlickable.contentHeight <= infoFlickable.height) { - return; - } + MouseArea { + anchors.fill: parent + acceptedButtons: Qt.NoButton + + onWheel: (wheel) => { + if (infoFlickable.contentHeight <= infoFlickable.height) + return - var newValue = Math.min((infoFlickable.contentHeight - infoFlickable.height), (Math.max(infoFlickable.originY , infoFlickable.contentY - event.angleDelta.y))); - infoFlickable.contentY = newValue; + var newValue = Math.min( + (infoFlickable.contentHeight - infoFlickable.height), + Math.max(infoFlickable.originY, infoFlickable.contentY - wheel.angleDelta.y) + ) + infoFlickable.contentY = newValue } }