mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
fix font size change when reopening the same credocument
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user