mirror of
https://github.com/koreader/koreader.git
synced 2025-12-24 12:14:05 +01:00
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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user