You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 7a28124
Browse filesBrowse the repository at this point in the historyBrowse files
add MouseWheelTurnsPage, fix wheel page turn at page edge (fixes#5069)
Two mouse-wheel problems on a page zoomed past the window.
RememberViewOffsetOnPageTurn applied to the page turn the wheel does when
it runs off the bottom of a page. That offset is the bottom - that is how
you got there - so the next page opened at its bottom, skipping its top,
and since the view was still at the bottom every further notch flipped
another page (pages 2 to 8 in six notches, showing only a sliver of each).
Reaching a page edge by scrolling now opens the next page at its top:
DisplayModel::GoToNextPage(bool keepViewOffset), false from the wheel.
Explicit page turns (N / P, click-to-turn, toolbar) are unchanged, as is
the up direction, which already went to the bottom of the previous page.
MouseWheelTurnsPage (default false) makes one notch a page turn instead of
a scroll, even when the page needs scrolling. It goes through the same
GoToNextPage / GoToPrevPage as N / P, so it composes with
RememberViewOffsetOnPageTurn: the view stays parked on the part of the
page you are reading and the pages move under it. Alt + wheel still
scrolls so the rest of the page is reachable; Shift + wheel and
Ctrl + wheel are unchanged. Deltas accumulate against WHEEL_DELTA so a
precision touchpad doesn't fly through the document.
Toggle it without editing settings with the existing
CmdToggleBoolSetting MouseWheelTurnsPage, documented in Commands.md and
Scrolling-and-zooming.md with a Key + ToolbarText shortcut example.
prompt: analyze issue 5069 and decide what the mouse wheel should do when RememberViewOffsetOnPageTurn is on, then implement it, documenting the existing CmdToggleBoolSetting instead of adding a new toggle command
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: docs/md/Commands.md
+15Lines changed: 15 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -537,6 +537,21 @@ Shortcuts [
537
537
]
538
538
```
539
539
540
+
Add `ToolbarText` to the same entry to also get a toolbar button for it. Example: turn the reading mode of [`MouseWheelTurnsPage`](Advanced-options-settings.md) on and off with `w` or from the toolbar:
541
+
542
+
```
543
+
Shortcuts [
544
+
[
545
+
Cmd = CmdToggleBoolSetting MouseWheelTurnsPage
546
+
Key = w
547
+
Name = Wheel Turns Page
548
+
ToolbarText = Wheel Turns Page
549
+
]
550
+
]
551
+
```
552
+
553
+
The same works for any other boolean advanced setting, e.g. `CmdToggleBoolSetting RememberViewOffsetOnPageTurn` or `CmdToggleBoolSetting ClickEdgeToTurnPage`.
Copy file name to clipboardExpand all lines: docs/md/Scrolling-and-zooming.md
+20Lines changed: 20 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,6 +23,26 @@ There are many ways to navigate around the document.
23
23
- press `Alt` while scrolling : scrolls faster (by half page instead of by line)
24
24
- mouse over scrollbar : scrolls faster (by half page instead of by line)
25
25
26
+
## Reading zoomed-in pages without the keyboard
27
+
28
+
When a page is zoomed past the window you usually care about one band of it — the music staves, the text inside wide scan margins — and want the next page to open at that same place. Two advanced settings do that:
29
+
30
+
-`RememberViewOffsetOnPageTurn = true` : next / previous page keeps the view where it is instead of jumping to the top of the new page. It applies to page turns you ask for (`n` / `p`, click-to-turn, the toolbar arrows). Wheeling off the bottom of a page still opens the next page at its top, since that is you reading on, not turning a page.
31
+
-`MouseWheelTurnsPage = true` : one wheel notch is a page turn rather than a scroll. `Alt + wheel` still scrolls, so you can always reach the rest of the page; `Shift + wheel` (horizontal) and `Ctrl + wheel` (zoom) are unchanged.
32
+
33
+
Turn on both and the wheel becomes a page turner while the view stays parked where you put it. To switch the mode on and off without editing the settings file, bind it to a key or a toolbar button with [`CmdToggleBoolSetting`](Commands.md#cmdtoggleboolsetting):
Copy file name to clipboardExpand all lines: docs/md/Version-history.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,7 +28,8 @@ Available in [pre-release](https://www.sumatrapdfreader.org/prerelease) builds.
28
28
- PDF bookmark / link destinations now apply Adobe-style view modes (`/Fit`, `/FitH`, `/FitV`, `/FitB`, `/FitBH`, `/FitBV`, `/XYZ` zoom) instead of only jumping to the page (fixes #5828)
29
29
- add `IgnoreDestinationZoom` advanced setting: when true, clicking a bookmark or a link inside the document keeps the zoom you are reading at instead of switching to the zoom the destination asks for; it still goes to the page and the position on it. The same option Adobe Reader and Foxit call "forbid the change of the current Zoom factor during execution of 'Go to Destination' actions"; off by default (discussion #5938)
30
30
- add `DisableLinks` advanced setting (default **false**): when true, document links are ignored so you can select and read without accidentally following them — useful for drawings and schematics with many links. Toggle it from the command palette. The existing **Toggle Show Links** only draws a blue outline around links; it does not disable them (fixes #5939)
31
-
- add `RememberViewOffsetOnPageTurn` advanced setting (default **false**): next/previous page keeps the same view position on the new page instead of jumping to the top, so zoomed-in pages of similar size stay lined up (fixes #5069)
31
+
- add `RememberViewOffsetOnPageTurn` advanced setting (default **false**): next/previous page keeps the same view position on the new page instead of jumping to the top, so zoomed-in pages of similar size stay lined up. It applies to explicit page turns (`N` / `P`, click-to-turn, the toolbar arrows); wheeling off the bottom of a page still opens the next page at its top, because there you are continuing to read rather than turning a page (fixes #5069)
32
+
- add `MouseWheelTurnsPage` advanced setting (default **false**): one wheel notch goes to the next / previous page instead of scrolling, even when the page is zoomed past the window. Together with `RememberViewOffsetOnPageTurn` the view stays parked on the part of the page you are reading and the pages move under it, which is how sheet music and scans with wide margins are read without touching the keyboard. `Alt + wheel` still scrolls, so the rest of the page stays reachable, and `Shift + wheel` (horizontal) and `Ctrl + wheel` (zoom) are unchanged. Bind it to a key or a toolbar button with `CmdToggleBoolSetting MouseWheelTurnsPage` (fixes #5069)
32
33
-`EBookUI` and `ComicBookUI` each have their own `DefaultDisplayMode` so ebooks and comics can open in a different layout than PDFs (empty keeps the global `DefaultDisplayMode`) (fixes #2588)
33
34
-`ComicBookUI.DefaultZoom` sets the first-open zoom for comic archives (`.cbz`, `.cbr`, …); empty keeps the global `DefaultZoom`. Use `fit width` so new comics fill the window while PDFs stay at Fit Page (fixes #5946)
34
35
- add `EBookUI.FontName` advanced setting: the font family for ebooks (EPUB, MOBI, FB2, …), e.g. `Segoe UI` or `Microsoft YaHei`. Empty (the default) keeps the engine serif. When set, it overrides the document's own `font-family` so you can read in a sans-serif or a CJK UI font without editing the file (fixes #3138)
0 commit comments