diff options
Diffstat (limited to 'place.go')
| -rw-r--r-- | place.go | 22 |
1 files changed, 4 insertions, 18 deletions
@@ -75,27 +75,13 @@ func (tk *guiWidget) placeWidgets(startW int, startH int) (int, int) { switch tk.node.WidgetType { case widget.Window: - newW := startW - newH := startH - // var maxH int = 0 for _, child := range tk.children { - child.placeWidgets(newW, newH) - sizeW, sizeH := child.Size() - /* - if sizeW < 20 { - sizeW = 20 - } - */ - newW += sizeW - newH += sizeH - /* - if sizeH > maxH { - maxH = sizeH - } - */ + child.placeWidgets(startW, startH) + sizeW, _ := child.Size() + startW += sizeW + 4 // add the width to move the next widget over } - return newW - startW, newH - startH + return startW, startH case widget.Tab: case widget.Grid: return tk.placeGrid(startW, startH) |
