mirror of
https://github.com/koreader/koreader.git
synced 2025-12-13 20:36:53 +01:00
UX: a set of minor fixes (#10165)
- AutoFrontlight plugin: update checkmark on toggling - KeepAlive plugin: update checkmark on toggling - ReaderPageMap: font size menu entry - ReaderStatus, common_settings_menu_table: book status "read" -> "finished"
This commit is contained in:
@@ -408,7 +408,7 @@ function ReaderPageMap:addToMainMenu(menu_items)
|
||||
},
|
||||
{
|
||||
text_func = function()
|
||||
return T(_("Page labels font size (%1)"), self.label_font_size)
|
||||
return T(_("Page labels font size: %1"), self.label_font_size)
|
||||
end,
|
||||
enabled_func = function() return self.show_page_labels end,
|
||||
callback = function(touchmenu_instance)
|
||||
|
||||
@@ -41,7 +41,7 @@ function ReaderStatus:onEndOfBook()
|
||||
return
|
||||
end
|
||||
|
||||
-- Should we start by marking the book as read?
|
||||
-- Should we start by marking the book as finished?
|
||||
if G_reader_settings:isTrue("end_document_auto_mark") then
|
||||
self:onMarkBook(true)
|
||||
end
|
||||
@@ -142,7 +142,7 @@ function ReaderStatus:onEndOfBook()
|
||||
elseif settings == "mark_read" then
|
||||
self:onMarkBook(true)
|
||||
UIManager:show(InfoMessage:new{
|
||||
text = _("You've reached the end of the document.\nThe current book is marked as read."),
|
||||
text = _("You've reached the end of the document.\nThe current book is marked as finished."),
|
||||
timeout = 3
|
||||
})
|
||||
elseif settings == "book_status_file_browser" then
|
||||
|
||||
@@ -624,7 +624,7 @@ common_settings.document_end_action = {
|
||||
},
|
||||
genGenericMenuEntry(_("Go to beginning"), "end_document_action", "goto_beginning", nil, true),
|
||||
genGenericMenuEntry(_("Return to file browser"), "end_document_action", "file_browser", nil, true),
|
||||
genGenericMenuEntry(_("Mark book as read"), "end_document_action", "mark_read", nil, true),
|
||||
genGenericMenuEntry(_("Mark book as finished"), "end_document_action", "mark_read", nil, true),
|
||||
genGenericMenuEntry(_("Book status and return to file browser"), "end_document_action", "book_status_file_browser", nil, true),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -116,13 +116,14 @@ end
|
||||
function AutoFrontlightWidget:addToMainMenu(menu_items)
|
||||
menu_items.auto_frontlight = {
|
||||
text = _("Auto frontlight"),
|
||||
callback = function()
|
||||
callback = function(touchmenu_instance)
|
||||
UIManager:show(ConfirmBox:new{
|
||||
text = T(_("Auto frontlight detects the brightness of the environment and automatically turn on and off the frontlight.\nFrontlight will be turned off to save battery in bright environment, and turned on in dark environment.\nDo you want to %1 it?"),
|
||||
AutoFrontlight.enabled and _("disable") or _("enable")),
|
||||
ok_text = AutoFrontlight.enabled and _("Disable") or _("Enable"),
|
||||
ok_callback = function()
|
||||
self:flipSetting()
|
||||
touchmenu_instance:updateItems()
|
||||
end
|
||||
})
|
||||
end,
|
||||
|
||||
@@ -13,17 +13,19 @@ local menuItem = {
|
||||
local disable
|
||||
local enable
|
||||
|
||||
local function showConfirmBox()
|
||||
local function showConfirmBox(touchmenu_instance)
|
||||
UIManager:show(ConfirmBox:new{
|
||||
text = _("The system won't sleep while this message is showing.\n\nPress \"Stay alive\" if you prefer to keep the system on even after closing this notification. *This will drain the battery*.\n\nIf KOReader terminates before \"Close\" is pressed, please start and close the KeepAlive plugin again to ensure settings are reset."),
|
||||
cancel_text = _("Close"),
|
||||
cancel_callback = function()
|
||||
disable()
|
||||
PluginShare.keepalive = false
|
||||
touchmenu_instance:updateItems()
|
||||
end,
|
||||
ok_text = _("Stay alive"),
|
||||
ok_callback = function()
|
||||
PluginShare.keepalive = true
|
||||
touchmenu_instance:updateItems()
|
||||
end,
|
||||
})
|
||||
end
|
||||
@@ -54,9 +56,9 @@ else
|
||||
return { disabled = true, }
|
||||
end
|
||||
|
||||
menuItem.callback = function()
|
||||
menuItem.callback = function(touchmenu_instance)
|
||||
enable()
|
||||
showConfirmBox()
|
||||
showConfirmBox(touchmenu_instance)
|
||||
end
|
||||
|
||||
local KeepAlive = WidgetContainer:extend{
|
||||
|
||||
Reference in New Issue
Block a user