widget.layout.horizontal: fix y coordinate

Signed-off-by: Gregor Best <gbe@intepi.net>
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Gregor Best 2009-08-27 14:26:54 +02:00 committed by Julien Danjou
parent 9cee78f3e2
commit 523fcb1690
1 changed files with 1 additions and 1 deletions

View File

@ -37,12 +37,12 @@ local function horizontal(direction, bounds, widgets, screen)
end
for _, v in ipairs(g) do
v.x = v.x + x
v.y = v.y + (margins[v] and (margins[v].top and margins[v].top or 0) or 0)
table.insert(geometries, v)
end
bounds = g.free
if margins[v] then
x = x + g.free.x + (margins[v].right or 0)
y = y + (margins[v].top or 0)
bounds.width = bounds.width - (margins[v].right or 0) - (margins[v].left or 0)
else
x = x + g.free.x