mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
[fix] Dictionary font size: avoid crash in reader mode (#5650)
This commit is contained in:
@@ -302,7 +302,7 @@ If you'd like to change the order in which dictionaries are queried (and their r
|
||||
local font_size = G_reader_settings:readSetting("dict_font_size") or 20
|
||||
return T(_("Font size (%1)"), font_size)
|
||||
end,
|
||||
callback = function()
|
||||
callback = function(touchmenu_instance)
|
||||
local SpinWidget = require("ui/widget/spinwidget")
|
||||
local font_size = G_reader_settings:readSetting("dict_font_size") or 20
|
||||
local items_font = SpinWidget:new{
|
||||
@@ -315,11 +315,12 @@ If you'd like to change the order in which dictionaries are queried (and their r
|
||||
title_text = _("Dictionary font size"),
|
||||
callback = function(spin)
|
||||
G_reader_settings:saveSetting("dict_font_size", spin.value)
|
||||
self.ui:onRefresh()
|
||||
if touchmenu_instance then touchmenu_instance:updateItems() end
|
||||
end,
|
||||
}
|
||||
UIManager:show(items_font)
|
||||
end
|
||||
end,
|
||||
keep_menu_open = true,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user