Various Grid comment updates.

This commit is contained in:
Pietro Gagliardi 2014-09-03 20:57:02 -04:00
parent dbba883776
commit 1eab40b646
1 changed files with 5 additions and 5 deletions

10
grid.go
View File

@ -269,7 +269,7 @@ func (g *grid) allocate(x int, y int, width int, height int, d *sizing) (allocat
} }
} }
// 3) compute and assign expanded widths/heights // 4) compute and assign expanded widths/heights
nxexpand := 0 nxexpand := 0
nyexpand := 0 nyexpand := 0
for x, expand := range xexpand { for x, expand := range xexpand {
@ -297,7 +297,7 @@ func (g *grid) allocate(x int, y int, width int, height int, d *sizing) (allocat
} }
} }
// 4) reset the final coordinates for the next step // 5) reset the final coordinates for the next step
for i := range g.controls { for i := range g.controls {
g.controls[i].finalx = 0 g.controls[i].finalx = 0
g.controls[i].finaly = 0 g.controls[i].finaly = 0
@ -305,7 +305,7 @@ func (g *grid) allocate(x int, y int, width int, height int, d *sizing) (allocat
g.controls[i].finalheight = 0 g.controls[i].finalheight = 0
} }
// 5) compute cell positions and widths // 6) compute cell positions and sizes
for y := 0; y < g.ymax; y++ { for y := 0; y < g.ymax; y++ {
curx := 0 curx := 0
prev := -1 prev := -1
@ -341,7 +341,7 @@ func (g *grid) allocate(x int, y int, width int, height int, d *sizing) (allocat
} }
} }
// 6) everything as it stands now is set for xalign == Fill yalign == Fill; set the correct alignments // 7) everything as it stands now is set for xalign == Fill yalign == Fill; set the correct alignments
// this is why we saved prefwidth/prefheight above // this is why we saved prefwidth/prefheight above
for i := range g.controls { for i := range g.controls {
if g.controls[i].xalign != Fill { if g.controls[i].xalign != Fill {
@ -364,7 +364,7 @@ func (g *grid) allocate(x int, y int, width int, height int, d *sizing) (allocat
} }
} }
// 7) and FINALLY we draw // 8) and FINALLY we draw
var current *allocation var current *allocation
for _, ycol := range gg { for _, ycol := range gg {