mirror of
https://github.com/airstruck/luigi.git
synced 2025-12-19 02:16:43 +00:00
shadow properties
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
return function (self)
|
||||
|
||||
self.value = 0
|
||||
self.flow = 'x' -- TODO: support vertical progress?
|
||||
|
||||
@@ -8,8 +7,14 @@ return function (self)
|
||||
width = 0,
|
||||
}
|
||||
|
||||
self:onReshape(function (event)
|
||||
self:onChange(function ()
|
||||
self:reshape()
|
||||
end)
|
||||
|
||||
self:onReshape(function ()
|
||||
local x1, y1, x2, y2 = self:getRectangle(true, true)
|
||||
bar.width = self.value * (x2 - x1)
|
||||
local min = bar.minimumWidth
|
||||
x1 = x1 + min
|
||||
bar.width = self.value * (x2 - x1) + min
|
||||
end)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user