summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-07-27 10:42:59 -0400
committerPietro Gagliardi <[email protected]>2014-07-27 10:42:59 -0400
commite679f8c9e468f4c587b53b866d67c181260de5c4 (patch)
treebb7a3896dcd194633eb9cafc58c0702b45baec7c
parentd34ffa326c98f1c385d2068ede115887e23b3e7e (diff)
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...
-rw-r--r--redo/sizing.go2
1 files changed, 1 insertions, 1 deletions
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-- {