mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Honor dithering on diagonal swipe refreshes (#5836)
c.f., https://github.com/koreader/koreader-base/pull/1039#issuecomment-583494496
This commit is contained in:
@@ -577,6 +577,7 @@ function UIManager:setDirty(widget, refreshtype, refreshregion, refreshdither)
|
||||
if self._window_stack[i].widget.dithered then
|
||||
-- NOTE: That works when refreshtype is NOT a function,
|
||||
-- which is why _repaint does another pass of this check ;).
|
||||
logger.dbg("setDirty on all widgets: found a dithered widget, infecting the refresh queue")
|
||||
refreshdither = true
|
||||
end
|
||||
end
|
||||
@@ -593,6 +594,18 @@ function UIManager:setDirty(widget, refreshtype, refreshregion, refreshdither)
|
||||
refreshdither = true
|
||||
end
|
||||
end
|
||||
else
|
||||
-- Another special case: if we did NOT specify a widget, but requested a full refresh nonetheless (i.e., a diagonal swipe),
|
||||
-- we'll want to check the window stack in order to honor dithering...
|
||||
if refreshtype == "full" then
|
||||
for i = 1, #self._window_stack do
|
||||
-- If any of 'em were dithered, honor their dithering hint
|
||||
if self._window_stack[i].widget.dithered then
|
||||
logger.dbg("setDirty full on no specific widget: found a dithered widget, infecting the refresh queue")
|
||||
refreshdither = true
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
-- handle refresh information
|
||||
if type(refreshtype) == "function" then
|
||||
|
||||
Reference in New Issue
Block a user