[okular] [Bug 420889] Shift+scroll wheel behavior broke
Patrick
bugzilla_noreply at kde.org
Fri Oct 16 15:18:20 BST 2020
https://bugs.kde.org/show_bug.cgi?id=420889
--- Comment #2 from Patrick <mail at patricksmits.net> ---
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) {
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the Okular-devel
mailing list