summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--grid.go2
-rw-r--r--yz_repaint_test.go2
2 files changed, 2 insertions, 2 deletions
diff --git a/grid.go b/grid.go
index 65c4d52..1b4f7bc 100644
--- a/grid.go
+++ b/grid.go
@@ -251,7 +251,7 @@ func (g *grid) allocate(x int, y int, width int, height int, d *sizing) (allocat
case LeftTop:
// do nothing; this is the default
case Center:
- // TODO
+ cell.xoff = (colwidths[cell.gridx] - cell.width) / 2
case RightBottom:
cell.xoff = colwidths[cell.gridx] - cell.width
case Fill:
diff --git a/yz_repaint_test.go b/yz_repaint_test.go
index c785274..f940f64 100644
--- a/yz_repaint_test.go
+++ b/yz_repaint_test.go
@@ -49,7 +49,7 @@ func newRepainter(times int) *repainter {
grid.Add(r.repaint, nil, East, false, 0, false, LeftTop)
grid.Add(r.width, r.x, South, true, Fill, false, LeftTop)
grid.Add(r.height, nil, East, true, Fill, false, LeftTop)
- grid.Add(r.all, nil, East, false, RightBottom, false, LeftTop)
+ grid.Add(r.all, nil, East, false, Center, false, LeftTop)
r.stack = NewVerticalStack(r.area, grid)
r.stack.SetStretchy(0)
return r