summaryrefslogtreecommitdiff
path: root/place.go
diff options
context:
space:
mode:
Diffstat (limited to 'place.go')
-rw-r--r--place.go22
1 files changed, 4 insertions, 18 deletions
diff --git a/place.go b/place.go
index ddd488d..12bb156 100644
--- a/place.go
+++ b/place.go
@@ -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)