sumatrapdf icon indicating copy to clipboard operation
sumatrapdf copied to clipboard

Single page fit scrollbar

Open Feldherren opened this issue 5 months ago • 3 comments

Adds a scrollbar for Fit a Single Page display mode, as requested here: https://github.com/sumatrapdfreader/sumatrapdf/issues/191 Scrollbar obeys the HideScrollbars setting in SumatraPDF-settings.txt; if HideScrollbars is true, the scrollbar is hidden, as expected. If HideScrollbars is false, the scrollbar is visible on the right-hand side of the screen.

Unfortunately, Canvas.cpp is reading as being entirely changed. Reading into things this may be a result of how line-endings are stored between different OSes? Sorry that it's ended up being a pain to read.

The changes made to Canvas.cpp: Line 13: added #include <algorithm> Lines 107 through 151: added scrollbar logic for when the display mode is single page. Lines ...uh, 1300~ to 1430~: handling ramifications of the scrollbar still being for the entire document when zoomed into a single page. Rate of scrolling on a single page probably needs to be tweaked.

Feldherren avatar Aug 28 '25 19:08 Feldherren

thanks alot for your attempt hope it works

9Skrip avatar Sep 07 '25 22:09 9Skrip

[diff] a pain to read

difftastic might help

cachius avatar Dec 05 '25 15:12 cachius

@Feldherren Turns out you're using LF line endings instead of the project's CRLF ones. You can ignore whitespace changes when vieing a diff on GitHub: https://github.com/sumatrapdfreader/sumatrapdf/pull/5078/files?diff=split&w=1

Please change to CRLF and commit.

cachius avatar Dec 05 '25 15:12 cachius