diff options
| author | Jeff Carr <[email protected]> | 2025-02-05 10:41:10 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-02-05 10:41:10 -0600 |
| commit | fb8d1d0940747e647fe48856d5a558ba333d8e90 (patch) | |
| tree | 141cd5668fff92adbb2852fafb71633f3f62ed80 /place.go | |
| parent | 12f3d5ac5cb4add74eb9a053ae1804c661654d09 (diff) | |
draws widgets in the right order but wrong place
Diffstat (limited to 'place.go')
| -rw-r--r-- | place.go | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -78,6 +78,8 @@ func (tk *guiWidget) placeWidgets(startW int, startH int) (int, int) { switch tk.node.WidgetType { case widget.Window: + startW += 4 + startH += 4 for _, child := range tk.children { child.placeWidgets(startW, startH) sizeW, _ := child.Size() @@ -88,9 +90,9 @@ func (tk *guiWidget) placeWidgets(startW int, startH int) (int, int) { case widget.Tab: case widget.Grid: tk.dumpWidget(fmt.Sprintf("PlaceGridS(%d,%d)", startW, startH)) - // reset the widths and heights maps here - tk.widths = make(map[int]int) // how tall each row in the grid is - tk.heights = make(map[int]int) // how wide each column in the grid is + // if you reset the values here, grid horizontal stacking doesn't work anymore + // tk.widths = make(map[int]int) // how tall each row in the grid is + // tk.heights = make(map[int]int) // how wide each column in the grid is newW, newH := tk.placeGrid(startW, startH) tk.full.w0 = newW tk.full.h0 = newH |
