Dispatcher: Set font

Closes: #8531
This commit is contained in:
yparitcher
2021-12-16 15:31:22 -05:00
parent 46f1f3eb5e
commit 035be38430
3 changed files with 14 additions and 2 deletions

View File

@@ -82,7 +82,7 @@ function ReaderFont:init()
end
end,
callback = function()
self:setFont(v)
self:onSetFont(v)
end,
hold_callback = function(touchmenu_instance)
self:makeDefault(v, touchmenu_instance)
@@ -283,7 +283,7 @@ function ReaderFont:onSaveSettings()
self.ui.doc_settings:saveSetting("gamma_index", self.gamma_index)
end
function ReaderFont:setFont(face)
function ReaderFont:onSetFont(face)
if face and self.font_face ~= face then
self.font_face = face
self.ui.document:setFontFace(face)