mirror of
https://github.com/airstruck/luigi.git
synced 2026-01-10 16:28:23 +00:00
fix regression in progress bar
This commit is contained in:
@@ -69,7 +69,7 @@ local mainForm = { id = 'mainWindow', type = 'panel',
|
|||||||
icon = 'icon/32px/Harddrive.png' },
|
icon = 'icon/32px/Harddrive.png' },
|
||||||
},
|
},
|
||||||
{ flow = 'x',
|
{ flow = 'x',
|
||||||
{ id = 'leftSideBox', width = 200, minwidth = 64,
|
{ id = 'leftSideBox', width = 200, minwidth = 64,
|
||||||
{ text = 'Hi, I\'m centered middle. ', style = 'listThing',
|
{ text = 'Hi, I\'m centered middle. ', style = 'listThing',
|
||||||
align = 'middle center' },
|
align = 'middle center' },
|
||||||
{ text = 'Hi, I\'m right bottom.\nAlso two lines, woopdy woop.Hi, I\'m right bottom.\nAlso two lines, woopdy woop.Hi, I\'m right bottom.\nAlso two lines, woopdy woop.', style = 'listThing',
|
{ text = 'Hi, I\'m right bottom.\nAlso two lines, woopdy woop.Hi, I\'m right bottom.\nAlso two lines, woopdy woop.Hi, I\'m right bottom.\nAlso two lines, woopdy woop.', style = 'listThing',
|
||||||
|
|||||||
@@ -21,9 +21,10 @@ return function (self)
|
|||||||
end)
|
end)
|
||||||
|
|
||||||
self:onReshape(function ()
|
self:onReshape(function ()
|
||||||
local x, y, w, h = self:getRectangle(true, true)
|
local x1, y1, w, h = self:getRectangle(true, true)
|
||||||
|
local x2, y2 = x1 + w, y1 + h
|
||||||
local min = bar.minwidth
|
local min = bar.minwidth
|
||||||
x = x + min
|
x1 = x1 + min
|
||||||
bar.width = self.value * w + min
|
bar.width = self.value * (x2 - x1) + min
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user