fix regression in progress bar

This commit is contained in:
airstruck
2015-11-30 11:16:56 -05:00
parent edecaaf907
commit 44d541bc8f
2 changed files with 5 additions and 4 deletions

View File

@@ -21,9 +21,10 @@ return function (self)
end)
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
x = x + min
bar.width = self.value * w + min
x1 = x1 + min
bar.width = self.value * (x2 - x1) + min
end)
end