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:
NiLuJe
2024-01-17 02:19:37 +01:00
parent 65e22ceafc
commit 90ae4acca6
11 changed files with 24 additions and 11 deletions

View File

@@ -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
}

View File

@@ -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
}