Actually implemented margins in the right place — in container.resize() itself, not just in the actual containers (as the old Stack and Grid code do). I'll need to remove them from Stack and Grid when I merge them back in...

This commit is contained in:
Pietro Gagliardi 2014-07-27 10:42:59 -04:00
parent d34ffa326c
commit e679f8c9e4
1 changed files with 1 additions and 1 deletions

View File

@ -41,7 +41,7 @@ func (c *container) resize(width, height int) {
return
}
d := c.d
allocations := c.child.allocate(0, 0, width, height, d)
allocations := c.child.allocate(0 + d.xmargin, 0 + d.ymargin, width - (2 * d.xmargin), height - (2 * d.ymargin), d)
c.translateAllocationCoords(allocations, width, height)
// move in reverse so as to approximate right->left order so neighbors make sense
for i := len(allocations) - 1; i >= 0; i-- {