mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Fix Color rendering toggle not toggable (#4836)
Also refresh screen when toggling.
This commit is contained in:
@@ -236,6 +236,7 @@ end
|
||||
|
||||
function ReaderPaging:onColorRenderingUpdate()
|
||||
self.ui.document:updateColorRendering()
|
||||
UIManager:setDirty(self.view.dialog, "partial")
|
||||
end
|
||||
|
||||
--[[
|
||||
|
||||
@@ -738,6 +738,7 @@ end
|
||||
|
||||
function ReaderRolling:onColorRenderingUpdate()
|
||||
self.ui.document:updateColorRendering()
|
||||
UIManager:setDirty(self.view.dialog, "partial")
|
||||
end
|
||||
|
||||
--[[
|
||||
|
||||
@@ -9,7 +9,7 @@ return {
|
||||
enabled_func = Screen.isColorScreen,
|
||||
checked_func = Screen.isColorEnabled,
|
||||
callback = function()
|
||||
local new_val = Screen.isColorEnabled()
|
||||
local new_val = not Screen.isColorEnabled()
|
||||
CanvasContext:setColorRenderingEnabled(new_val)
|
||||
G_reader_settings:saveSetting("color_rendering", new_val)
|
||||
UIManager:broadcastEvent(Event:new("ColorRenderingUpdate"))
|
||||
|
||||
Reference in New Issue
Block a user