summaryrefslogtreecommitdiff
path: root/newctrl/simplegrid.go
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-10-18 08:57:53 -0400
committerPietro Gagliardi <[email protected]>2014-10-18 08:57:53 -0400
commit45acb35a6d89c2e7c7d2233f3613d04253f88922 (patch)
treef01291c519c387510ef05d7a8f0131dafebeb0a6 /newctrl/simplegrid.go
parent772f03f4b3d4fb45ee0359af7742effdcee8a557 (diff)
Fixed control positioning on GTK+. This will also "fix" control positioning on Windows; next commit.
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