diff options
Diffstat (limited to 'place.go')
| -rw-r--r-- | place.go | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -55,6 +55,9 @@ func (tk *guiWidget) placeWidgets(startW int, startH int) (int, int) { return 0, 0 } + tk.startW = startW + tk.startH = startH + switch tk.WidgetType { case widget.Window: newW := startW @@ -103,7 +106,7 @@ func (tk *guiWidget) placeWidgets(startW int, startH int) (int, int) { return maxW, newH - startH default: tk.gocuiSetWH(startW, startH) - return tk.Width(), tk.Height() + return tk.gocuiSize.Width(), tk.gocuiSize.Height() } return 0, 0 } @@ -116,7 +119,7 @@ func (w *guiWidget) placeGrid(startW int, startH int) (int, int) { // first compute the max sizes of the rows and columns for _, child := range w.children { - childW, childH := child.placeWidgets(startW, startH) + childW, childH := child.placeWidgets(child.startW, child.startH) // set the child's realWidth, and grid offset if w.widths[child.AtW] < childW { @@ -131,7 +134,7 @@ func (w *guiWidget) placeGrid(startW int, startH int) (int, int) { var maxW int = 0 var maxH int = 0 - + // find the width and height offset of the grid for AtW,AtH for _, child := range w.children { child.showWidgetPlacement("grid1:") |
