File manager: fix classic mode item font size (#11626)

Closes #11625.
reviewable/pr11628/r1
hius07 4 weeks ago committed by GitHub
parent 601925ab87
commit c415aea67e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -172,7 +172,8 @@ function FileManagerMenu:setUpdateItemTable()
sub_item_table = {
{
text_func = function()
return T(_("Items per page: %1"), G_reader_settings:readSetting("items_per_page"))
return T(_("Items per page: %1"),
G_reader_settings:readSetting("items_per_page") or FileChooser.items_per_page_default)
end,
help_text = _([[This sets the number of items per page in:
- File browser, history and favorites in 'classic' display mode
@ -180,8 +181,8 @@ function FileManagerMenu:setUpdateItemTable()
- File and folder selection
- Calibre and OPDS browsers/search results]]),
callback = function(touchmenu_instance)
local current_value = G_reader_settings:readSetting("items_per_page")
local default_value = FileChooser.items_per_page_default
local current_value = G_reader_settings:readSetting("items_per_page") or default_value
local widget = SpinWidget:new{
title_text = _("Items per page"),
value = current_value,
@ -204,7 +205,8 @@ function FileManagerMenu:setUpdateItemTable()
end,
callback = function(touchmenu_instance)
local current_value = FileChooser.font_size
local default_value = FileChooser.getItemFontSize(G_reader_settings:readSetting("items_per_page"))
local default_value = FileChooser.getItemFontSize(G_reader_settings:readSetting("items_per_page")
or FileChooser.items_per_page_default)
local widget = SpinWidget:new{
title_text = _("Item font size"),
value = current_value,

Loading…
Cancel
Save