mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
adapt ui to loadDocument before setFont
This commit is contained in:
@@ -147,7 +147,7 @@ function CreDocument:init()
|
||||
|
||||
-- @TODO check the default view_mode to a global user configurable
|
||||
-- variable 22.12 2012 (houqp)
|
||||
ok, self._document = pcall(cre.openDocument, self.file, style_sheet,
|
||||
ok, self._document = pcall(cre.newDocView, style_sheet,
|
||||
Screen:getWidth(), Screen:getHeight(), self.PAGE_VIEW_MODE)
|
||||
if not ok then
|
||||
self.error_message = self.doc -- will contain error message
|
||||
@@ -162,6 +162,10 @@ function CreDocument:init()
|
||||
--self._document:setDefaultInterlineSpace(self.line_space_percent)
|
||||
end
|
||||
|
||||
function CreDocument:loadDocument()
|
||||
self._document:loadDocument(self.file)
|
||||
end
|
||||
|
||||
function CreDocument:drawCurrentView(target, x, y, rect, pos)
|
||||
tile_bb = Blitbuffer.new(rect.w, rect.h)
|
||||
self._document:drawCurrentPage(tile_bb)
|
||||
|
||||
Reference in New Issue
Block a user