fix font size change when reopening the same credocument

pull/415/head
chrox 11 years ago
parent 27d7a7b1b6
commit 01046fe478

@ -22,14 +22,6 @@ function ReaderCoptListener:onReadSettings(config)
end)
end
local copt_font_size = config:readSetting("copt_font_size")
if copt_font_size then
table.insert(self.ui.postInitCallback, function()
self.ui.document:setFontSize(copt_font_size)
self.ui:handleEvent(Event:new("UpdatePos"))
end)
end
local copt_margins = config:readSetting("copt_page_margins")
if copt_margins then
table.insert(self.ui.postInitCallback, function()

@ -8,6 +8,7 @@ local Input = require("ui/input")
local Event = require("ui/event")
local UIManager = require("ui/uimanager")
local Screen = require("ui/screen")
local DEBUG = require("dbg")
local _ = require("gettext")
local ReaderFont = InputContainer:new{
@ -80,7 +81,7 @@ function ReaderFont:onReadSettings(config)
--@TODO change this! 12.01 2013 (houqp)
self.font_size = 29
end
self.ui.document:setFontSize(self.font_size)
self.ui.document:setFontSize(Screen:scaleByDPI(self.font_size))
self.line_space_percent = config:readSetting("line_space_percent")
if not self.line_space_percent then

Loading…
Cancel
Save