Repro: http://haxeui.org/builder/?978e0f1a
Root cause (haxe/ui/layouts/VerticalLayout.hx, repositionChildren):
child.moveComponent(xpos, ypos + marginTop(child));
ypos += child.componentHeight + verticalSpacing;
The child itself IS shifted down by its own marginTop when placed, but the running
ypos used to place the NEXT sibling only advances by componentHeight + verticalSpacing -
it never adds marginTop(child) or marginBottom(child) into that running total. So:
- a child's marginBottom has no visible effect at all
- a child's marginTop shifts that child down but does not push later siblings down too,
so it visually overlaps with/crowds the previous sibling instead of adding a gap
Expected: a 40px gap between "First" and "Second" (from first.marginBottom), and another
40px gap between "Second" and "Third" (from third.marginTop).
Actual: both labels are packed back-to-back with no gap, as if the margins were 0
Repro: http://haxeui.org/builder/?978e0f1a
Root cause (haxe/ui/layouts/VerticalLayout.hx, repositionChildren):
The child itself IS shifted down by its own marginTop when placed, but the running
yposused to place the NEXT sibling only advances by componentHeight + verticalSpacing -it never adds marginTop(child) or marginBottom(child) into that running total. So:
- a child's marginBottom has no visible effect at all
- a child's marginTop shifts that child down but does not push later siblings down too,
so it visually overlaps with/crowds the previous sibling instead of adding a gap
Expected: a 40px gap between "First" and "Second" (from first.marginBottom), and another
40px gap between "Second" and "Third" (from third.marginTop).
Actual: both labels are packed back-to-back with no gap, as if the margins were 0