Fix hdpi trackpad scrolling when scroll animations are enabled.
Some checks failed
Build / Initialization (push) Has been cancelled
Build / Code Format Validation (push) Has been cancelled
Build / Linux (Qt6) (push) Has been cancelled
Build / Linux (Qt6 + 7zip) (push) Has been cancelled
Build / macOS (Qt6 Universal) (push) Has been cancelled
Build / Windows x64 (Qt6) (push) Has been cancelled
Build / Windows ARM64 (Qt6) (push) Has been cancelled
Build / Docker amd64 Image (push) Has been cancelled
Build / Docker arm64 Image (push) Has been cancelled
Build / Publish Dev Builds (push) Has been cancelled
Build / Publish Release (push) Has been cancelled
Build / Publish YACReader10 Pre-release Builds (push) Has been cancelled

This commit is contained in:
luisangelsm
2026-04-08 22:27:53 +02:00
parent 691bbb8b5c
commit 668cc48578
3 changed files with 6 additions and 0 deletions

View File

@ -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();