mirror of
https://github.com/airstruck/luigi.git
synced 2025-12-19 02:16:43 +00:00
width/height shadow properties
This commit is contained in:
@@ -13,7 +13,7 @@ return function (self)
|
||||
|
||||
self:onReshape(function ()
|
||||
local x1, y1, x2, y2 = self:getRectangle(true, true)
|
||||
local min = bar.minimumWidth
|
||||
local min = bar.minwidth
|
||||
x1 = x1 + min
|
||||
bar.width = self.value * (x2 - x1) + min
|
||||
end)
|
||||
|
||||
@@ -21,6 +21,7 @@ return function (self)
|
||||
local nextSibling = self:getNext()
|
||||
local prevSize = prevSibling and prevSibling[dimension]
|
||||
local nextSize = nextSibling and nextSibling[dimension]
|
||||
|
||||
if prevSize then
|
||||
prevSibling:setDimension(dimension,
|
||||
event[axis] - prevSibling:calculatePosition(axis))
|
||||
@@ -28,12 +29,9 @@ return function (self)
|
||||
if nextSize then
|
||||
nextSibling:setDimension(dimension,
|
||||
nextSibling:calculatePosition(axis) +
|
||||
nextSibling[dimension] - event[axis])
|
||||
nextSibling:calculateDimension(dimension) - event[axis])
|
||||
end
|
||||
|
||||
prevSibling:reshape()
|
||||
nextSibling:reshape()
|
||||
self:reshape()
|
||||
end)
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user