Fix overlap in scroll mode for cre documents (#3870)

Use a setting 'copt_overlap_lines' (default to 1) for the
number of text lines from previous page to show on next
page (instead of a hardcoded and unscaled 20).
Take footer height into account for overlap calculation
and dim area.
Show overlap only when changing pages (not when panning).

Also fix ReaderFooter:getHeight() which was returning
a higher height than the real one since footer refactoring.
This commit is contained in:
poire-z
2018-04-14 00:26:57 +02:00
committed by GitHub
parent 2dc508537c
commit 82b13a64b0
3 changed files with 24 additions and 14 deletions

View File

@@ -577,7 +577,7 @@ describe("Readerfooter module", function()
assert.falsy(footer.has_no_mode)
assert.truthy(readerui.view.footer_visible)
assert.is.same(24, footer:getHeight())
assert.is.same(15, footer:getHeight())
end)
it("should return correct footer height when all modes are disabled", function()
@@ -595,7 +595,7 @@ describe("Readerfooter module", function()
assert.truthy(footer.has_no_mode)
assert.falsy(readerui.view.footer_visible)
assert.is.same(24, footer:getHeight())
assert.is.same(15, footer:getHeight())
end)
it("should disable footer if settings.disabled is true", function()