sumatrapdf icon indicating copy to clipboard operation
sumatrapdf copied to clipboard

Bookmarks pane does not scroll correctly with touch/touchpad

Open EpicWolverine opened this issue 10 years ago • 5 comments

When using a touchscreen or touchpad to scroll/pan the main PDF area, it moves perfectly with one-to-one tracking and momentum when flick scrolling. However, the bookmarks pane only scrolls one entry at a time at a fixed speed when scrolled in this manner. This is fine when done with a scroll wheel, but doesn't make sense with a touchscreen or two-finger touchpad where the expected behavior is similar to the behavior in the main PDF area.

EpicWolverine avatar Mar 29 '16 15:03 EpicWolverine

Totally the same problem on my Surface 3!

kaiwu-astro avatar Apr 07 '16 18:04 kaiwu-astro

@kjk Since the necessary behaviour is to step focus from one line to the next I think the current behaviour is on that basis both fast (on my underpowered touchpad system) and as smooth as can be expected from "stepping" I suggest if you agree that it is working per design then this issue can be closed ?

GitHubRulesOK avatar Feb 14 '20 11:02 GitHubRulesOK

I can reproduce this on my touch screen but I'm not sure if we can improve it.

Scroll of main area is handled by our code.

Bookmarks are displayed using standard tree control. Not sure if it's even possible to take over scrolling.

I couldn't find any references to slow scrolling with touch on the web.

Maybe can be tweaked with TreeView_SetAutoScrollInfo but docs for this are non-existent and I can't find any code that uses it to see what good values could be.

kjk avatar Feb 15 '20 00:02 kjk

Maybe try http://www.danielmoth.com/Blog/tvsexautohscroll.aspx

kjk avatar Feb 15 '20 01:02 kjk

I tried:

        SendMessageW(hwnd, TVM_SETEXTENDEDSTYLE, TVS_EX_AUTOHSCROLL, TVS_EX_AUTOHSCROLL);
        WPARAM pixelsPerSec = 80;
        LPARAM redrawInterval = 10;
        SendMessageW(hwnd, TVM_SETAUTOSCROLLINFO, pixelsPerSec, redrawInterval);

and it didn't help.

I compared with scrolling in explorer's treeview and we are on par so closing this as a fix, even if possible, would probably require some unreasonable level of messing with tree view internals.

BTW: for me only touch scrolling is slow. Scrolling with touchpad or trackpad is fast.

It could also be some system-level config value or value specific to a given touch driver.

kjk avatar Feb 15 '20 01:02 kjk