From e679f8c9e468f4c587b53b866d67c181260de5c4 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Sun, 27 Jul 2014 10:42:59 -0400 Subject: 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... MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- redo/sizing.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/redo/sizing.go b/redo/sizing.go index b7f76d8..4098f06 100644 --- a/redo/sizing.go +++ b/redo/sizing.go @@ -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-- { -- cgit v1.2.3