adjust font sizes in credocument according to screen dpi

and font sizes list is moved to defaults.lua
This commit is contained in:
chrox
2013-10-16 17:06:28 +08:00
parent 4cd8a0e9e6
commit 32ffacdf77
4 changed files with 25 additions and 6 deletions

View File

@@ -141,14 +141,14 @@ end
function ReaderFont:onSetFontSize(new_size)
if new_size > 44 then new_size = 44 end
if new_size < 18 then new_size = 18 end
if new_size < 16 then new_size = 16 end
self.font_size = new_size
UIManager:show(Notification:new{
text = _("Set font size to ")..self.font_size,
timeout = 1,
})
self.ui.document:setFontSize(new_size)
self.ui.document:setFontSize(scaleByDPI(new_size))
self.ui:handleEvent(Event:new("UpdatePos"))
return true