From 45acb35a6d89c2e7c7d2233f3613d04253f88922 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Sat, 18 Oct 2014 08:57:53 -0400 Subject: Fixed control positioning on GTK+. This will also "fix" control positioning on Windows; next commit. --- newctrl/simplegrid.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'newctrl/simplegrid.go') 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 -- cgit v1.2.3