[okular] [Bug 421159] Scrolling by clicking the scroll bar is reset by scrolling with scroll wheel
David Hurka
bugzilla_noreply at kde.org
Tue Oct 13 17:04:38 BST 2020
https://bugs.kde.org/show_bug.cgi?id=421159
David Hurka <david.hurka at mailbox.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Latest Commit| |https://invent.kde.org/grap
| |hics/okular/commit/17c26699
| |3deda05713171f824669cb4e09a
| |6ee65
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #15 from David Hurka <david.hurka at mailbox.org> ---
Git commit 17c266993deda05713171f824669cb4e09a6ee65 by David Hurka.
Committed on 12/10/2020 at 11:16.
Pushed by ngraham into branch 'release/20.08'.
Fix scrolling with scrollbar when the slider is not clicked
This fixes scrolling with the scrollbar,
so it is not reset when scrolling on the viewport afterwards.
PageView’s QSroller was not correctly updated by update_scroller,
because it was connected to QAbstractSlider::sliderMoved and sliderReleased,
which are only emitted while the “slider is down”,
i. e. not when the user scrolls the scrollbar other than dragging the slider.
Now update_scroller is connected to actionTriggered(),
which is emitted for all user interactions.
Note that scrolling using the scrollbar calls
QAbstractScrollArea::scrollContentsBy(),
and so bypasses smooth scrolling of the QScroller. This could be considered a
feature,
otherwise it is more a bug in Qt than in Okular, because we can not ignore
scrollContentsBy().
Steps to reproduce:
1. Open a long document
2. Click on the vertical scrollbar below the slider
3. Okular scrolls one page down
4. Scroll in the viewport
5. Okular starts scrolling from the position from step 1.
Test plan:
* Scroll using scrollbar
+ Click on the vertical scrollbar below the slider
+ Middle-click on the vertical scrollbar below the slider
+ Click on the little arrow of the vertical scrollbar
+ Scroll using a scrolling device (e. g. `xdotool click 4`) on the vertical
scrollbar
+ Drag the slider of the scrollbar
* “cross-product” verify QScroller state
+ Scroll using a scrolling device on the viewport
+ Scroll using Browse tool dragging
+ Scroll the viewport by clicking a point in the thumbnails view
+ Scroll the viewport using arrow keys and Page Up/Down keys
M +7 -4 ui/pageview.cpp
https://invent.kde.org/graphics/okular/commit/17c266993deda05713171f824669cb4e09a6ee65
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the Okular-devel
mailing list