Bug 377128

Summary: Zooming with ctrl+scrolling too fast
Product: [Applications] okular Reporter: Stephan Burkhardt <oceanofsolaris>
Component: generalAssignee: Okular developers <okular-devel>
Status: RESOLVED FIXED    
Severity: minor    
Priority: NOR    
Version: 1.0.0   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Stephan Burkhardt 2017-03-02 22:03:00 UTC
When I zoom using ctrl+scrolling (using a touchpad or a thinkpad pointing stick), okular zooms out or in way too fast.

Reproduce:
Open a document at 100% zoom, hold ctrl and scroll half a fingers width on your touchpad
Result:
Okular zooms out to 12% zoom (smallest level)
Expected:
Zoom out one step (to e.g. 90 %).

The same happens when zooming in (get to 1600% zoom while barely moving my fingers). This makes zooming using ctrl+scroll impossible since I always overshoot my desired zoom level by large margins.

This is on Arch Linux with KDE 5.9.3 and okular 1.0.2, the touchpad being handled by libinput 1.6.2. The fault might also lie with the way libinput generates scroll events.
Comment 1 Albert Astals Cid 2017-03-03 22:56:40 UTC
Git commit 7a50ce0edfc9be8bd23441e52a4f3a0c60f7e60f by Albert Astals Cid.
Committed on 03/03/2017 at 22:56.
Pushed by aacid into branch 'Applications/16.12'.

Accumulate Control+Wheel Deltas until they reach QWheelEvent::DefaultDeltasPerStep

This way zooming in/out with a touchpad is easier to control

M  +50   -28   ui/pageview.cpp

https://commits.kde.org/okular/7a50ce0edfc9be8bd23441e52a4f3a0c60f7e60f