diff options
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 |
