mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
fix: stop self.dimen polution for inputcontainers
Without this fix, self.dimen is shared among all inputcontainers intances, which breaks some of the UI rendering. All widget should set/initialize their own self.dimen in self:init() method.
This commit is contained in:
@@ -7,14 +7,13 @@ WidgetContainer is a container for another Widget
|
||||
local WidgetContainer = Widget:new()
|
||||
|
||||
function WidgetContainer:init()
|
||||
if not self.dimen then
|
||||
self.dimen = Geom:new{}
|
||||
end
|
||||
if not self.dimen.w then
|
||||
self.dimen.w = self[1].getSize().w
|
||||
end
|
||||
if not self.dimen.h then
|
||||
self.dimen.h = self[1].getSize().h
|
||||
if self.dimen then
|
||||
if not self.dimen.w then
|
||||
self.dimen.w = self[1].getSize().w
|
||||
end
|
||||
if not self.dimen.h then
|
||||
self.dimen.h = self[1].getSize().h
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user