mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
add readerconfig to document supported by crengine
* now font size can be changed by readerconfig
This commit is contained in:
@@ -110,6 +110,17 @@ function ReaderFont:onChangeSize(direction)
|
||||
return true
|
||||
end
|
||||
|
||||
function ReaderFont:onSetFontSize(new_size)
|
||||
if new_size > 44 then new_size = 44 end
|
||||
if new_size < 18 then new_size = 18 end
|
||||
|
||||
self.font_size = new_size
|
||||
self.ui.document:setFontSize(new_size)
|
||||
self.ui:handleEvent(Event:new("UpdatePos"))
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
function ReaderFont:onChangeLineSpace(direction)
|
||||
if direction == "decrease" then
|
||||
self.line_space_percent = self.line_space_percent - 10
|
||||
|
||||
Reference in New Issue
Block a user