[UX] Set font size for menu items (#5146)

Ref: #4757
This PR add option to changing the font size of items in menu widget (filemanger in classic mode, TOC) in single line mode.
Close: #4757
This commit is contained in:
Robert
2019-07-28 08:37:43 +02:00
committed by Frans de Jonge
parent 2da0e54b7a
commit b71d0a19b8
3 changed files with 51 additions and 22 deletions

View File

@@ -929,8 +929,8 @@ function Menu:updateItems(select_number)
end
--font size between 12 and 18 for better matching
local infont_size = math.floor(18 - (self.perpage - 6) / 3)
--font size between 14 and 24 for better matching
local font_size = math.floor(24 - ((self.perpage - 6)/ 18) * 10 )
--default font size between 14 and 24 for better matching
local font_size = G_reader_settings:readSetting("items_font_size") or math.floor(24 - ((self.perpage - 6)/ 18) * 10 )
for c = 1, math.min(self.perpage, #self.item_table) do
-- calculate index in item_table