diff options
| author | Pietro Gagliardi <[email protected]> | 2014-09-03 21:31:38 -0400 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-09-03 21:31:38 -0400 |
| commit | 982da8c896fa9ec5c7742afa97f611b3ff91c172 (patch) | |
| tree | 66605384ea222d6307441fc44c1e76f094bc5d08 /grid.go | |
| parent | 7b1194a5af502c5b0d8f66f37ad06819d58eae0b (diff) | |
Fixed a dumb bug in Grid that prevented the scrollbars in Area from showing up.
Diffstat (limited to 'grid.go')
| -rw-r--r-- | grid.go | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -311,7 +311,7 @@ func (g *grid) allocate(x int, y int, width int, height int, d *sizing) (allocat prev := -1 for x := 0; x < g.xmax; x++ { i := gg[y][x] - if i != -1 { + if i != -1 && y == g.controls[i].y { // don't repeat this step if the control spans vertically if i != prev { g.controls[i].finalx = curx } else { @@ -328,7 +328,7 @@ func (g *grid) allocate(x int, y int, width int, height int, d *sizing) (allocat prev := -1 for y := 0; y < g.ymax; y++ { i := gg[y][x] - if i != -1 { + if i != -1 && x == g.controls[i].x { // don't repeat this step if the control spans horizontally if i != prev { g.controls[i].finaly = cury } else { @@ -400,7 +400,7 @@ func (g *grid) preferredSize(d *sizing) (width, height int) { gg, colwidths, rowheights := g.mkgrid() // 1) compute colwidths and rowheights before handling expansion - // TODO put this in its own function + // TODO put this in its own function (but careful about the spanning calculation in allocate()) for y := 0; y < len(gg); y++ { for x := 0; x < len(gg[y]); x++ { i := gg[y][x] |
