From 9a3e73b46001219177bb13a381420007217dfecf Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Wed, 25 Jun 2014 23:05:29 -0400 Subject: Finished the Windows conversion to the new sizing system. Untested. --- grid.go | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'grid.go') diff --git a/grid.go b/grid.go index f454945..58a2dbb 100644 --- a/grid.go +++ b/grid.go @@ -124,7 +124,7 @@ func (g *Grid) make(window *sysData) error { return nil } -func (g *Grid) setRect(x int, y int, width int, height int, d *sysSizeData) (allocations []*allocation) { +func (g *Grid) allocate(x int, y int, width int, height int, d *sysSizeData) (allocations []*allocation) { max := func(a int, b int) int { if a > b { return a @@ -135,9 +135,12 @@ func (g *Grid) setRect(x int, y int, width int, height int, d *sysSizeData) (all var current *allocation // for neighboring // before we do anything, steal the margin so nested Stacks/Grids don't double down - margin := d.margin - d.margin = 0 -_=margin + xmargin := d.xmargin + ymargin := d.ymargin + d.xmargin = 0 + d.ymargin = 0 +_=xmargin +_=ymargin // 1) clear data structures for i := range g.rowheights { g.rowheights[i] = 0 -- cgit v1.2.3