mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Chore: Review FrameContainer constructors for shared dimen objects
Nothing else seems problematic, this is mostly just cosmetic sanitization around Geom objects.
This commit is contained in:
@@ -959,6 +959,7 @@ function ListMenu:_recalculateDimen()
|
||||
self.item_height = math.floor(available_height / self.perpage) - Size.line.thin
|
||||
self.item_width = self.inner_dimen.w
|
||||
self.item_dimen = Geom:new{
|
||||
x = 0, y = 0,
|
||||
w = self.item_width,
|
||||
h = self.item_height
|
||||
}
|
||||
|
||||
@@ -419,6 +419,7 @@ function MosaicMenuItem:init()
|
||||
vertical_align = "top",
|
||||
padding = 0,
|
||||
dimen = Geom:new{
|
||||
x = 0, y = 0,
|
||||
w = self.width,
|
||||
h = self.height
|
||||
},
|
||||
@@ -523,8 +524,8 @@ function MosaicMenuItem:update()
|
||||
radius = Screen:scaleBySize(10),
|
||||
OverlapGroup:new{
|
||||
dimen = dimen_in,
|
||||
CenterContainer:new{ dimen=dimen_in, directory},
|
||||
BottomContainer:new{ dimen=dimen_in, nbitems},
|
||||
CenterContainer:new{ dimen = dimen_in, directory},
|
||||
BottomContainer:new{ dimen = dimen_in, nbitems},
|
||||
},
|
||||
}
|
||||
else
|
||||
@@ -890,6 +891,7 @@ function MosaicMenu:_recalculateDimen()
|
||||
self.item_height = math.floor((self.inner_dimen.h - self.others_height - (1+self.nb_rows)*self.item_margin) / self.nb_rows)
|
||||
self.item_width = math.floor((self.inner_dimen.w - (1+self.nb_cols)*self.item_margin) / self.nb_cols)
|
||||
self.item_dimen = Geom:new{
|
||||
x = 0, y = 0,
|
||||
w = self.item_width,
|
||||
h = self.item_height
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user