mirror of
https://github.com/koreader/koreader.git
synced 2025-12-24 12:14:05 +01:00
decouple UI definitions from document modules
This commit is contained in:
committed by
Frans de Jonge
parent
02eca23649
commit
9e57e56f95
@@ -3,7 +3,6 @@ local CacheItem = require("cacheitem")
|
||||
local Device = require("device")
|
||||
local Document = require("document/document")
|
||||
local DrawContext = require("ffi/drawcontext")
|
||||
local KoptOptions = require("ui/data/koptoptions")
|
||||
local logger = require("logger")
|
||||
local util = require("util")
|
||||
local ffi = require("ffi")
|
||||
@@ -16,7 +15,6 @@ local PdfDocument = Document:new{
|
||||
_document = false,
|
||||
is_pdf = true,
|
||||
dc_null = DrawContext.new(),
|
||||
options = KoptOptions,
|
||||
epub_font_size = G_reader_settings:readSetting("copt_font_size")
|
||||
or DCREREADER_CONFIG_DEFAULT_FONT_SIZE or 22,
|
||||
koptinterface = nil,
|
||||
@@ -39,7 +37,7 @@ function PdfDocument:init()
|
||||
end
|
||||
end
|
||||
self.koptinterface = require("document/koptinterface")
|
||||
self.configurable:loadDefaults(self.options)
|
||||
self.koptinterface:setDefaultConfigurable(self.configurable)
|
||||
local ok
|
||||
ok, self._document = pcall(pdf.openDocument, self.file)
|
||||
if not ok then
|
||||
|
||||
Reference in New Issue
Block a user