Bug 407549 - On continuous view, if >2 pages fit on-screen, left/right arrows inconsistent (next/previous page)
Summary: On continuous view, if >2 pages fit on-screen, left/right arrows inconsistent...
Status: REPORTED
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-05-15 06:50 UTC by nyanpasu64
Modified: 2019-05-16 09:40 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description nyanpasu64 2019-05-15 06:50:36 UTC
SUMMARY
If I enable continuous mode and zoom out until over 2 pages fit on screen at once (eg. widescreen PDF slides), then scrolling computes page number using center of screen, but left/right arrows aligns selected page to top of screen.

STEPS TO REPRODUCE
1. Open a PDF document and zoom out until over 2 pages fit on screen.
    - The bottom of the screen says page 1 (top of screen).
2. Press right arrow to enter page 2.
    - The bottom of the screen says page 2 (top of screen).
3. Scroll down and up.
    - The position of the document is identical to "after step 2", however...
    - The bottom of the screen says page 3 (center of screen).

If you press left/right arrow after step 2, you will end up on page 1/3.
If you press left/right arrow after step 2, you will end up on page 2/4.

EXPECTED RESULT
I'm not sure how to fix this behavioral inconsistency. I personally want a choice in the Settings menu between multiple different behaviors, but you can hard-code one of the behaviors, or find another internally-consistent and user-friendly solution.

## Top of screen

`top_float` = "page number at top of screen" (similar to left/right arrow today). Defaults to 1.0 when opening a document. Scrolling half of page 1 off-screen = 1.5.

I want pressing (left, right) for the following `top_float` to set `top_float` to:

2 -> (1, 3)
2.01 to 2.99 -> (2, 3)

- Left arrow moves to page `ceil(top_float) - 1`
- Right arrow moves to page `floor(top_float) + 1`
- The page number is displayed as `floor(top_float)`

## "Centered Page" in scare-quotes

`top_float` = "page number at top of screen" (as above).
`center_float` = "page number at center of screen" (similar to Okular scrolling today).

I want pressing (left, right) for the following `top_float` to set `top_float` to:

1.5 to 2.49... -> (1, 3)
2.5 to 3.49... -> (2, 4)

- Left arrow moves to page `round(top_float) - 1`???
- Right arrow moves to page `round(top_float) + 1`???
- The page number is displayed as `round(top_float)` (matches left/right arrows).

Currently, Okular uses this approach, but with `floor(center_float)` instead, which suffers from the above-mentioned consistency issues.

------

A previous version of Windows Foxit used "top of screen" behavior for left/right arrows (which I disliked at the time), but an update changed it to "center of screen" behavior (and now I want the older behavior back XD).

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Kubuntu 18.04
(available in About System)
KDE Plasma Version: 5.12.7
KDE Frameworks Version: 5.44.0
Qt Version: 5.9.5

ADDITIONAL INFORMATION
Okular versions with bug:
Ubuntu: 1.5.70
Flatpak flathub: 1.7.0
Flatpak kdeapps: 1.7.70 master, commit f741df1186ad
Comment 1 nyanpasu64 2019-05-16 09:40:08 UTC
If using "Centered Page" behavior, I think it would make sense to keep current behavior (floor(center_float)) when pages are over 1 screen tall.

floor(center_float): we properly switch to `currently visible page +- 1 page`.

round(top_float): If over half the current page is off-screen, we will switch to `current page or +2`, which is confusing.