mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Merge pull request #484 from thotypous/master
Reload workaround for cre: prefer using in-memory config
This commit is contained in:
@@ -34,7 +34,9 @@ function ReaderTypeset:onReadSettings(config)
|
||||
end
|
||||
|
||||
function ReaderTypeset:_setPageMargins()
|
||||
local copt_margins = self.ui.doc_settings:readSetting("copt_page_margins") or DCREREADER_CONFIG_MARGIN_SIZES_MEDIUM
|
||||
local copt_margins = self.ui.document.configurable.page_margins or
|
||||
self.ui.doc_settings:readSetting("copt_page_margins") or
|
||||
DCREREADER_CONFIG_MARGIN_SIZES_MEDIUM
|
||||
self.ui:handleEvent(Event:new("SetPageMargins", copt_margins))
|
||||
end
|
||||
|
||||
@@ -117,7 +119,8 @@ function ReaderTypeset:toggleFloatingPunctuation()
|
||||
self.ui.document:setFloatingPunctuation(self.floating_punctuation)
|
||||
--self.ui:handleEvent(Event:new("UpdatePos"))
|
||||
-- workaround: set again things unset by crengine after changing floating punctuation
|
||||
self.ui.document:setFontFace(self.ui.doc_settings:readSetting("font_face"))
|
||||
self.ui.document:setFontFace(self.ui.font.font_face or
|
||||
self.ui.doc_settings:readSetting("font_face"))
|
||||
self:_setPageMargins()
|
||||
end
|
||||
|
||||
|
||||
@@ -222,11 +222,12 @@ function ReaderUI:init()
|
||||
ui = self
|
||||
})
|
||||
-- font menu
|
||||
table.insert(self, ReaderFont:new{
|
||||
self.font = ReaderFont:new{
|
||||
dialog = self.dialog,
|
||||
view = self[1],
|
||||
ui = self
|
||||
})
|
||||
}
|
||||
table.insert(self, self.font) -- hold reference to font menu
|
||||
table.insert(self, ReaderHyphenation:new{
|
||||
dialog = self.dialog,
|
||||
view = self[1],
|
||||
|
||||
Reference in New Issue
Block a user