cre scroll mode: fix last line of book hidden by footer

By scrolling last page a little bit further.

Also fix a few other scroll mode issues, all related
to doc_height not being updated (eg, in the middle of
a book, and doubling the font size, one would not
be able to turn pages and read the 2nd half of the
book...)
This commit is contained in:
poire-z authored and Frans de Jonge committed 2019-02-26 09:43:35 +01:00
1 parent 918f296bd3
commit 1c0a8c1ef9
2 files changed
+23 -8

No files matched your search

+11 -2
View File
@@ -200,10 +200,19 @@ function CreDocument:render()
end
logger.dbg("CreDocument: rendering document...")
self._document:renderDocument()
if not self.info.has_pages then
self.info.doc_height = self._document:getFullHeight()
self.been_rendered = true
logger.dbg("CreDocument: rendering done.")
end
function CreDocument:_readMetadata()
Document._readMetadata(self) -- will grab/update self.info.number_of_pages
if self.been_rendered then
-- getFullHeight() would crash if the document is not
-- yet rendered
self.info.doc_height = self._document:getFullHeight()
end
logger.dbg("CreDocument: rendering done.")
return true
end
function CreDocument:close()