Inform once about color rendering on supported devices (#3289)

pull/3290/head
poire-z 7 years ago committed by Frans de Jonge
parent 23e2183931
commit 308c243238

@ -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
}

@ -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

Loading…
Cancel
Save