Fix scrolling, add inertial scroll on non-eInk devices

Add a new reader module: ReaderScrolling, that exposes
some Scrolling options to the menu (which are to be used
by and implemented in ReaderPaging and ReaderRolling
themselves) and implement some inertial scrolling logic
used by both of them.
Default to "Classic scrolling" which is the expected
behaviour on phones and tablets.
The old CreDocument buggy behaviour is available as
"Turbo scrolling" for both Paging and Rolling documents.
Added a "On release scrolling" option that might be
useful on eInk to avoid dynamic pan/scrolling.

Try to avoid bad interactions between pan and swipe,
cancelling unwanted panning if we ended up doing a
swipe or multiswipe.
This commit is contained in:
poire-z
2021-05-19 22:57:54 +02:00
parent e4fd45ef08
commit d0165f8bd1
12 changed files with 747 additions and 30 deletions

View File

@@ -130,6 +130,7 @@ function ReaderConfig:onShowConfigMenu()
-- show last used panel when opening config dialog
self.config_dialog:onShowConfigPanel(self.last_panel_index)
UIManager:show(self.config_dialog)
self.ui:handleEvent(Event:new("HandledAsSwipe")) -- cancel any pan scroll made
return true
end