summaryrefslogtreecommitdiff
path: root/newctrl/simplegrid.go
diff options
context:
space:
mode:
Diffstat (limited to 'newctrl/simplegrid.go')
-rw-r--r--newctrl/simplegrid.go4
1 files changed, 1 insertions, 3 deletions
diff --git a/newctrl/simplegrid.go b/newctrl/simplegrid.go
index 4d6c51d..aac2586 100644
--- a/newctrl/simplegrid.go
+++ b/newctrl/simplegrid.go
@@ -136,6 +136,7 @@ func (g *simpleGrid) resize(x int, y int, width int, height int, d *sizing) {
if len(g.controls) == 0 {
return
}
+ x, y, width, height = g.container.bounds(d)
// -1) get this SimpleGrid's padding
xpadding := d.xpadding
ypadding := d.ypadding
@@ -146,9 +147,6 @@ func (g *simpleGrid) resize(x int, y int, width int, height int, d *sizing) {
// 0) inset the available rect by the needed padding and reset x/y for children
width -= (len(g.colwidths) - 1) * xpadding
height -= (len(g.rowheights) - 1) * ypadding
- // TODO get the correct client rect
- x = 0
- y = 0
// 1) clear data structures
for i := range g.rowheights {
g.rowheights[i] = 0