From 668cc485787de5f374ea42274aa18b83de3a870e Mon Sep 17 00:00:00 2001 From: luisangelsm Date: Wed, 8 Apr 2026 22:27:53 +0200 Subject: [PATCH] Fix hdpi trackpad scrolling when scroll animations are enabled. --- CHANGELOG.md | 1 + YACReader/viewer.cpp | 4 ++++ custom_widgets/whats_new_dialog.cpp | 1 + 3 files changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5d1be3e1..1fa7a639 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ Version counting is based on semantic versioning (Major.Feature.Patch) * Add support for continuous scroll mode. * Fix the translator. * Add Lanczos interpolation for image scaling. You can control the method used via the settings under `Image adjustments`. +* Fix hdpi trackpad scrolling when scroll animations are enabled. ### YACReaderLibrary * Navigating between comics in the metadata editor no longer copies fields from the previous comic into ones that have no value set. To edit shared metadata across multiple comics at once, select them all and use the bulk edit dialog. diff --git a/YACReader/viewer.cpp b/YACReader/viewer.cpp index c2b310cf..ec2deca1 100644 --- a/YACReader/viewer.cpp +++ b/YACReader/viewer.cpp @@ -797,6 +797,10 @@ void Viewer::wheelEventTrackpad(QWheelEvent *event) { auto delta = event->pixelDelta(); + // Treat pixel-based scrolling as direct manipulation, not as an animation target. + horizontalScroller->stop(); + verticalScroller->stop(); + // Apply delta to horizontal scrollbar if (delta.x() != 0) { int newHorizontalValue = horizontalScrollBar()->value() - delta.x(); diff --git a/custom_widgets/whats_new_dialog.cpp b/custom_widgets/whats_new_dialog.cpp index ce973014..6d9d1169 100644 --- a/custom_widgets/whats_new_dialog.cpp +++ b/custom_widgets/whats_new_dialog.cpp @@ -50,6 +50,7 @@ YACReader::WhatsNewDialog::WhatsNewDialog(QWidget *parent) " • Add support for continuous scroll mode
" " • Fix the translator
" " • Add Lanczos interpolation for image scaling. You can control the method used via the settings under Image adjustments
" + " • Fix hdpi trackpad scrolling when scroll animations are enabled
" "
" "YACReaderLibrary
" " • Navigating between comics in the metadata editor no longer copies fields from the previous comic into ones that have no value set. To edit shared metadata across multiple comics at once, select them all and use the bulk edit dialog
"