diff options
Diffstat (limited to 'place.go')
| -rw-r--r-- | place.go | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -22,13 +22,15 @@ func (tk *guiWidget) placeBox(startW int, startH int) { log.Log(INFO, "BOX START size(W,H) =", sizeW, sizeH, "new(W,H) =", newW, newH) child.placeWidgets(newW, newH) sizeW, sizeH = child.Size() - if child.direction == widget.Horizontal { - log.Log(INFO, "BOX IS HORIZONTAL", tk.String(), "newWH()", newW, newH, "child()", sizeW, sizeH, child.String()) - // expand based on the child width - newW += sizeW - } else { + if child.node.State.Direction == widget.Vertical { log.Log(INFO, "BOX IS VERTICAL ", tk.String(), "newWH()", newW, newH, "child()", sizeW, sizeH, child.String()) // expand based on the child height + // something is wrong here + newW += sizeW + } else { + log.Log(INFO, "BOX IS HORIZONTAL", tk.String(), "newWH()", newW, newH, "child()", sizeW, sizeH, child.String()) + // expand based on the child width + // something is wrong here newH += sizeH } log.Log(INFO, "BOX END size(W,H) =", sizeW, sizeH, "new(W,H) =", newW, newH) @@ -74,7 +76,6 @@ func (tk *guiWidget) placeWidgets(startW int, startH int) (int, int) { case widget.Group: // move the group to the parent's next location tk.gocuiSetWH(startW, startH) - // tk.dumpTree("start place") newW := startW + me.GroupPadW newH := startH + 1 // normal hight of the group label @@ -93,7 +94,6 @@ func (tk *guiWidget) placeWidgets(startW int, startH int) (int, int) { } log.Log(INFO, "REAL HEIGHT sizeW:", sizeW, "sizeH:", sizeH) } - // tk.dumpTree("end place") return maxW, newH - startH default: tk.gocuiSetWH(startW, startH) |
