CoverBrowser: list mode: fix overlap of directories and nb items

reviewable/pr5670/r1
poire-z 5 years ago
parent e9032a2b2a
commit 016df709af

@ -225,7 +225,8 @@ function ListMenuItem:update()
text = self.mandatory, text = self.mandatory,
face = Font:getFace("infont", math.min(max_fontsize_fileinfo, _fontSize(15))), face = Font:getFace("infont", math.min(max_fontsize_fileinfo, _fontSize(15))),
} }
local wleft_width = dimen.w - wright:getSize().w local pad_width = Screen:scaleBySize(10) -- on the left, in between, and on the right
local wleft_width = dimen.w - wright:getWidth() - 3*pad_width
local wleft = TextBoxWidget:new{ local wleft = TextBoxWidget:new{
text = self.text, text = self.text,
face = Font:getFace("cfont", _fontSize(20)), face = Font:getFace("cfont", _fontSize(20)),
@ -238,7 +239,7 @@ function ListMenuItem:update()
LeftContainer:new{ LeftContainer:new{
dimen = dimen, dimen = dimen,
HorizontalGroup:new{ HorizontalGroup:new{
HorizontalSpan:new{ width = Screen:scaleBySize(10) }, HorizontalSpan:new{ width = pad_width },
wleft, wleft,
} }
}, },
@ -246,7 +247,7 @@ function ListMenuItem:update()
dimen = dimen, dimen = dimen,
HorizontalGroup:new{ HorizontalGroup:new{
wright, wright,
HorizontalSpan:new{ width = Screen:scaleBySize(10) }, HorizontalSpan:new{ width = pad_width },
}, },
}, },
} }

Loading…
Cancel
Save