diff --git a/frontend/ui/elements/screen_color_menu_table.lua b/frontend/ui/elements/screen_color_menu_table.lua index d2b4a9105..d26f0c204 100644 --- a/frontend/ui/elements/screen_color_menu_table.lua +++ b/frontend/ui/elements/screen_color_menu_table.lua @@ -8,7 +8,7 @@ return { enabled_func = Screen.isColorScreen, checked_func = Screen.isColorEnabled, callback = function() - G_reader_settings:flipNilOrTrue("color_rendering") + G_reader_settings:saveSetting("color_rendering", not Screen.isColorEnabled()) UIManager:broadcastEvent(Event:new("ColorRenderingUpdate")) end } diff --git a/reader.lua b/reader.lua index 2782ae429..8d9cb51a8 100755 --- a/reader.lua +++ b/reader.lua @@ -141,6 +141,18 @@ if Device:needsTouchScreenProbe() then Device:touchScreenProbe() end +-- Inform once about color rendering on newly supported devices +-- (there are some android devices that may not have a color screen, +-- and we are not (yet?) able to guess that fact) +if Device.hasColorScreen() and not G_reader_settings:has("color_rendering") then + -- enable it to prevent further display of this message + G_reader_settings:saveSetting("color_rendering", true) + local InfoMessage = require("ui/widget/infomessage") + UIManager:show(InfoMessage:new{ + text = _("Documents will be rendered in color on this device.\nIf your device is grayscale, you can disable color rendering in the screen sub-menu for reduced memory usage."), + }) +end + local exit_code = nil if ARGV[argidx] and ARGV[argidx] ~= "" then