diff options
| author | Jeff Carr <[email protected]> | 2024-01-28 20:15:59 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-01-28 20:15:59 -0600 |
| commit | 3029f04bd2b82eadfe7d5569616c322175a94c64 (patch) | |
| tree | 199ae0b7f98171838439cc8299990e5c91217f18 /place.go | |
| parent | 63b76b29127aae98f5b709611cfcd036484ebefe (diff) | |
trying to compute sizes
Signed-off-by: Jeff Carr <[email protected]>
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:") |
