diff options
| author | Jeff Carr <[email protected]> | 2024-02-05 04:19:32 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-02-05 04:19:32 -0600 |
| commit | 94b41aa18a230289e30254b3a23b39c88193159a (patch) | |
| tree | 72f3be3b29cd0bde18e78ca116e65f4832f8625e /place.go | |
| parent | a15aea03ea4d0bc73d3773f7c77b380caa57153c (diff) | |
gadget window displays correctly for some reason
Signed-off-by: Jeff Carr <[email protected]>
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) |
