mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
TextEditor: allow scrolling by lines with Pan (#4145)
Feature of ScrollTextWidget, only used for now by TextEditor. Pan is like Swipe, but wait a bit at end of gesture to release: the line on which Pan was started will be moved to where Pan is released. May conflict with MovableContainer (so not enabled for DictQuickLookup, where it could have been nice - but it would work only with text dictionaries, not with HTML ones, as ScrollHtmlWidget can't really do that).
This commit is contained in:
@@ -128,6 +128,8 @@ local InputDialog = InputContainer:new{
|
||||
-- note that the text widget can be scrolled with Swipe North/South even when no button
|
||||
keyboard_hidden = false, -- start with keyboard hidden in full fullscreen mode
|
||||
-- needs add_nav_bar to have a Show keyboard button to get it back
|
||||
scroll_by_pan = false, -- allow scrolling by lines with Pan (= Swipe, but wait a bit at end
|
||||
-- of gesture before releasing) (may conflict with movable)
|
||||
|
||||
-- If save_callback provided, a Save and a Close buttons will be added to the first row
|
||||
-- if reset_callback provided, a Reset button will be added (before Save) to the first row
|
||||
@@ -359,6 +361,7 @@ function InputDialog:init()
|
||||
edit_callback = self._buttons_edit_callback, -- nil if no Save/Close buttons
|
||||
scroll_callback = self._buttons_scroll_callback, -- nil if no Nav or Scroll buttons
|
||||
scroll = true,
|
||||
scroll_by_pan = self.scroll_by_pan,
|
||||
cursor_at_end = self.cursor_at_end,
|
||||
readonly = self.readonly,
|
||||
parent = self,
|
||||
|
||||
Reference in New Issue
Block a user