font menu for readerui

This commit is contained in:
Qingping Hou
2012-06-12 17:42:02 +08:00
parent f8f188ff89
commit acaf8d660e
6 changed files with 51 additions and 9 deletions

View File

@@ -107,3 +107,12 @@ function ReaderView:onRotationUpdate(rotation)
self:recalculate()
end
function ReaderView:onFontChange(font_face)
msg = InfoMessage:new{ text = "Redrawing with "..font_face}
UIManager:show(msg)
self.ui.document:setFont(font_face)
-- signal readerrolling to update pos in new height
self.ui:handleEvent(Event:new("UpdatePos"))
UIManager:close(msg)
end