diff --git a/frontend/ui/widget/container/framecontainer.lua b/frontend/ui/widget/container/framecontainer.lua index 199fdf1c9..6dbc0de52 100644 --- a/frontend/ui/widget/container/framecontainer.lua +++ b/frontend/ui/widget/container/framecontainer.lua @@ -94,10 +94,16 @@ end function FrameContainer:paintTo(bb, x, y) local my_size = self:getSize() if not self.dimen then - self.dimen = Geom:new{x = x, y = y, w = my_size.w, h = my_size.h} + self.dimen = Geom:new{ + x = x, y = y, + w = my_size.w, h = my_size.h + } else self.dimen.x = x self.dimen.y = y + -- Possibly redundant + self.dimen.w = my_size.w + self.dimen.h = my_size.h end local container_width = self.width or my_size.w local container_height = self.height or my_size.h diff --git a/frontend/ui/widget/container/inputcontainer.lua b/frontend/ui/widget/container/inputcontainer.lua index c8ecbef79..2f4957335 100644 --- a/frontend/ui/widget/container/inputcontainer.lua +++ b/frontend/ui/widget/container/inputcontainer.lua @@ -72,7 +72,10 @@ function InputContainer:paintTo(bb, x, y) if not self.dimen then local content_size = self[1]:getSize() - self.dimen = Geom:new{x = x, y = y, w = content_size.w, h = content_size.h} + self.dimen = Geom:new{ + x = x, y = y, + w = content_size.w, h = content_size.h + } else self.dimen.x = x self.dimen.y = y diff --git a/frontend/ui/widget/container/underlinecontainer.lua b/frontend/ui/widget/container/underlinecontainer.lua index f5a938a32..fbd53a1a4 100644 --- a/frontend/ui/widget/container/underlinecontainer.lua +++ b/frontend/ui/widget/container/underlinecontainer.lua @@ -27,11 +27,19 @@ end function UnderlineContainer:paintTo(bb, x, y) local container_size = self:getSize() - self.dimen = Geom:new{ - x = x, y = y, - w = container_size.w, - h = container_size.h - } + if not self.dimen then + self.dimen = Geom:new{ + x = x, y = y, + w = container_size.w, + h = container_size.h + } + else + self.dimen.x = x + self.dimen.y = y + -- Possibly redundant + self.dimen.w = container_size.w + self.dimen.h = container_size.h + end local content_size = self[1]:getSize() local p_y = y if self.vertical_align == "center" then diff --git a/frontend/ui/widget/imagewidget.lua b/frontend/ui/widget/imagewidget.lua index f3dda77a3..10f1379d8 100644 --- a/frontend/ui/widget/imagewidget.lua +++ b/frontend/ui/widget/imagewidget.lua @@ -515,11 +515,19 @@ function ImageWidget:paintTo(bb, x, y) if self.hide then return end -- self:_render is called in getSize method local size = self:getSize() - self.dimen = Geom:new{ - x = x, y = y, - w = size.w, - h = size.h - } + if not self.dimen then + self.dimen = Geom:new{ + x = x, y = y, + w = size.w, + h = size.h + } + else + self.dimen.x = x + self.dimen.y = y + -- Possibly redundant + self.dimen.w = size.w + self.dimen.h = size.h + end logger.dbg("blitFrom", x, y, self._offset_x, self._offset_y, size.w, size.h) local do_alpha = false if self.alpha == true then diff --git a/frontend/ui/widget/progresswidget.lua b/frontend/ui/widget/progresswidget.lua index fbd00a47f..844770dd3 100644 --- a/frontend/ui/widget/progresswidget.lua +++ b/frontend/ui/widget/progresswidget.lua @@ -110,11 +110,19 @@ end function ProgressWidget:paintTo(bb, x, y) local my_size = self:getSize() - self.dimen = Geom:new{ - x = x, y = y, - w = my_size.w, - h = my_size.h - } + if not self.dimen then + self.dimen = Geom:new{ + x = x, y = y, + w = my_size.w, + h = my_size.h + } + else + self.dimen.x = x + self.dimen.y = y + -- Possibly redundant + self.dimen.w = my_size.w + self.dimen.h = my_size.h + end if self.dimen.w == 0 or self.dimen.h == 0 then return end local _mirroredUI = BD.mirroredUILayout() diff --git a/frontend/ui/widget/virtualkeyboard.lua b/frontend/ui/widget/virtualkeyboard.lua index 209ca3f2c..75b4c60b9 100644 --- a/frontend/ui/widget/virtualkeyboard.lua +++ b/frontend/ui/widget/virtualkeyboard.lua @@ -310,8 +310,8 @@ function VirtualKey:init() self.flash_keyboard = G_reader_settings:nilOrTrue("flash_keyboard") end -function VirtualKey:paintTo(bb, x ,y) - InputContainer.paintTo(self, bb, x, y) +function VirtualKey:paintTo(...) + InputContainer.paintTo(self, ...) -- Fudge self.dimen to include the padding, to make sure said padding is covered by our ges_events range... -- Like Geom, floor coordinates & ceil dims, to fill the gaps without overlaps.