Bug 420824 - Zoom in over "Fit Width" in two page mode
Summary: Zoom in over "Fit Width" in two page mode
Status: RESOLVED FIXED
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: 1.9.80
Platform: Arch Linux Linux
: NOR minor
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-04-30 20:19 UTC by Filippo Volpe
Modified: 2020-05-26 21:01 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Filippo Volpe 2020-04-30 20:19:56 UTC
SUMMARY
When two page mode is selected and zoom with ctrl+mousewheel I can only go from the minimum percentage (ie 12%) to "Fit Width" and can't go further. If one page mode is selected this is not a problem and works normally. I verified the problem with at least .pdf and .djvu files. 
The only way there's to achieve more zoom that is to manually go to the zoom dropdown menu and select a a value higher than what "Fit width" currently corresponds to given the window size and then it works as expected until you zoom out of the two pages, then the problem reappear.

STEPS TO REPRODUCE
1. Open a pdf file with more than 2 pages
2. Set view mode as "facing pages"
3. Zoom in from the minimum percentage

OBSERVED RESULT
The zoom locks at "Fit Width" level and won't go further.

EXPECTED RESULT
Being able to zoom in to from 12% to 400% with only a ctrl+mousewheel action as it works in view mode "single page".

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 5.6.7
(available in About System)
KDE Plasma Version: 5.18.4
KDE Frameworks Version: 5.69.0
Qt Version: 5.14.2
Comment 1 Raul Laasner 2020-05-20 12:40:02 UTC
I'm facing exactly the same problem. It has appeared within the last week or so. I tried downloading and compiling an older version of Okular (1.8.70) but the problem persists, which makes me think it is related to something else.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 5.18.5
KDE Frameworks Version: 5.70.0
Qt Version: 5.14.2
Comment 3 Raul Laasner 2020-05-26 16:41:29 UTC
I tested the fix and it works for me. Thanks!
Comment 4 Albert Astals Cid 2020-05-26 21:01:55 UTC
Git commit 040e11c52baa95566f3700cda784bd81772eae54 by Albert Astals Cid.
Committed on 25/05/2020 at 22:48.
Pushed by aacid into branch 'release/20.04'.

Fix ZoomIn getting stuck when on facing pages

We need to use int when calculating colWidth in zoomFactorFitMode since
we also use int when calculating it in PageView::slotRelayoutPages,
otherwise the calculated numbers are veeeeeeery similar but not the same
and the algorithm gets all confused

M  +24   -0    autotests/parttest.cpp
M  +1    -1    ui/pageview.cpp

https://invent.kde.org/graphics/okular/commit/040e11c52baa95566f3700cda784bd81772eae54