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:
poire-z
2018-08-10 18:05:09 +02:00
committed by GitHub
parent d222fe25b6
commit adceda15b7
5 changed files with 71 additions and 0 deletions

View File

@@ -378,6 +378,7 @@ function TextEditor:editFile(file_path, readonly)
cursor_at_end = false,
readonly = readonly,
add_nav_bar = true,
scroll_by_pan = true,
buttons = is_lua and {{
-- First button on first row, that will be filled with Reset|Save|Close
{