Summary: | Shift+scroll wheel behavior broke | ||
---|---|---|---|
Product: | [Applications] okular | Reporter: | Patrick <mail> |
Component: | general | Assignee: | Okular developers <okular-devel> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | aacid, kde, keziolio123, nate, oliver.sander |
Priority: | VHI | Keywords: | regression |
Version: | 20.04.0 | ||
Target Milestone: | --- | ||
Platform: | Arch Linux | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/graphics/okular/commit/777ac37ea21212c4d924c75be5cee502ad5820c0 | Version Fixed In: | 1.11.3 |
Description
Patrick
2020-05-02 08:49:32 UTC
Can confirm. I didn't even know this feature existed! The original shift+wheel behavior was handled by QAbstractSlider (in QAbstractSliderPrivate::scrollByDelta), which is inherited by QScrollBar and triggered by QAbstractScrollArea::wheelEvent. Possible fix: --- src/okular-20.08.2/ui/pageview.cpp 2020-10-05 08:26:20.000000000 +0200 +++ pageview.cpp 2020-10-16 14:59:28.407667911 +0200 @@ -3123,7 +3123,9 @@ void PageView::wheelEvent(QWheelEvent *e d->scroller->scrollTo(QPoint(horizontalScrollBar()->value(), verticalScrollBar()->value()), 0); // sync scroller with scrollbar } } else { - if (delta != 0 && delta % QWheelEvent::DefaultDeltasPerStep == 0) { + if ((e->modifiers() & Qt::ShiftModifier) == Qt::ShiftModifier) { + QAbstractScrollArea::wheelEvent(e); + } else if (delta != 0 && delta % QWheelEvent::DefaultDeltasPerStep == 0) { // number of scroll wheel steps Qt gives to us at the same time int count = abs(delta / QWheelEvent::DefaultDeltasPerStep); if (delta < 0) { Thanks Patrick. That works great for me. Would you like to submit it as a merge request (targeting the `release/20.08` branch) at https://invent.kde.org/graphics/okular/-/merge_requests/? That would be lovely. Here's the supporting documentation: https://community.kde.org/Infrastructure/GitLab I guess not. I'll submit it myself then, but I'll use your authorship info. A possibly relevant merge request was started @ https://invent.kde.org/graphics/okular/-/merge_requests/298 Ok, thanks. Git commit 777ac37ea21212c4d924c75be5cee502ad5820c0 by Nate Graham. Committed on 21/10/2020 at 17:52. Pushed by ngraham into branch 'release/20.08'. Fix fast scrolling with Shift+Scroll When holding down the shift key, multiply wheel and touchpad scroll distances by 10 to re-implement the fast scrolling feature that broke when we added animated/smooth scrolling. FIXED-IN: 1.11.3 M +5 -2 ui/pageview.cpp https://invent.kde.org/graphics/okular/commit/777ac37ea21212c4d924c75be5cee502ad5820c0 |