mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
clean up refreshes
This is a larger clean-up of the refresh situation. The general shift is that refreshes are now mainly triggered by the (top-level) widgets when they get shown or closed via UIManager. All refreshes for the widgets when they are in use were handled by themselves before. This adds the case of showing/closing. It is the desired result of not having UIManager:show()/:close() do (full screen) refreshes on its own.
This commit is contained in:
@@ -15,6 +15,7 @@ local BBoxWidget = InputContainer:new{
|
||||
screen_bbox = nil,
|
||||
linesize = 2,
|
||||
fine_factor = 10,
|
||||
dimen = Geom:new(),
|
||||
}
|
||||
|
||||
function BBoxWidget:init()
|
||||
@@ -55,6 +56,9 @@ function BBoxWidget:getSize()
|
||||
end
|
||||
|
||||
function BBoxWidget:paintTo(bb, x, y)
|
||||
self.dimen = self.view.dimen:copy()
|
||||
self.dimen.x, self.dimen.y = x, y
|
||||
|
||||
-- As getScreenBBox uses view states, screen_bbox initialization is postponed.
|
||||
self.screen_bbox = self.screen_bbox or self:getScreenBBox(self.page_bbox)
|
||||
local bbox = self.screen_bbox
|
||||
|
||||
Reference in New Issue
Block a user