summaryrefslogtreecommitdiff
path: root/place.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-02-01 10:06:09 -0600
committerJeff Carr <[email protected]>2024-02-01 10:06:09 -0600
commite4339f33acfcb7796917dd3f432a505416025de3 (patch)
treebec2ef7180b9fd4b4e5c353e5ead22c53f928289 /place.go
parent99bb171bd9298fe109c3af649be76a3b73c54b9e (diff)
maybe stable with the dns control panel
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'place.go')
-rw-r--r--place.go24
1 files changed, 12 insertions, 12 deletions
diff --git a/place.go b/place.go
index c0cf1b9..194e6a5 100644
--- a/place.go
+++ b/place.go
@@ -12,28 +12,28 @@ func (tk *guiWidget) placeBox(startW int, startH int) {
if tk.WidgetType != widget.Box {
return
}
- tk.dumpTree("beforebox")
+ // tk.dumpTree("beforebox")
newW := startW
newH := startH
for _, child := range tk.children {
sizeW, sizeH := child.Size()
- log.Log(NOW, "BOX START size(W,H) =", sizeW, sizeH, "new(W,H) =", newW, newH)
+ 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(NOW, "BOX IS HORIZONTAL", tk.String(), "newWH()", newW, newH, "child()", sizeW, sizeH, child.String())
+ 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 {
- log.Log(NOW, "BOX IS VERTICAL ", tk.String(), "newWH()", newW, newH, "child()", sizeW, sizeH, child.String())
+ log.Log(INFO, "BOX IS VERTICAL ", tk.String(), "newWH()", newW, newH, "child()", sizeW, sizeH, child.String())
// expand based on the child height
newH += sizeH
}
- log.Log(NOW, "BOX END size(W,H) =", sizeW, sizeH, "new(W,H) =", newW, newH)
+ log.Log(INFO, "BOX END size(W,H) =", sizeW, sizeH, "new(W,H) =", newW, newH)
}
- tk.dumpTree("afterbox")
+ // tk.dumpTree("afterbox")
}
func (tk *guiWidget) placeWidgets(startW int, startH int) (int, int) {
@@ -74,7 +74,7 @@ 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")
+ // tk.dumpTree("start place")
newW := startW + me.GroupPadW
newH := startH + 1 // normal hight of the group label
@@ -93,7 +93,7 @@ func (tk *guiWidget) placeWidgets(startW int, startH int) (int, int) {
}
log.Log(INFO, "REAL HEIGHT sizeW:", sizeW, "sizeH:", sizeH)
}
- tk.dumpTree("end place")
+ // tk.dumpTree("end place")
return maxW, newH - startH
default:
tk.gocuiSetWH(startW, startH)
@@ -103,7 +103,7 @@ func (tk *guiWidget) placeWidgets(startW int, startH int) (int, int) {
}
func (w *guiWidget) placeGrid(startW int, startH int) (int, int) {
- w.showWidgetPlacement("grid0:")
+ // w.showWidgetPlacement("grid0:")
if w.WidgetType != widget.Grid {
return 0, 0
}
@@ -128,7 +128,7 @@ func (w *guiWidget) placeGrid(startW int, startH int) (int, int) {
// find the width and height offset of the grid for AtW,AtH
for _, child := range w.children {
- child.showWidgetPlacement("grid1:")
+ // child.showWidgetPlacement("grid1:")
var totalW, totalH int
for i, w := range w.widths {
@@ -155,9 +155,9 @@ func (w *guiWidget) placeGrid(startW int, startH int) (int, int) {
log.Log(INFO, "placeGrid:", child.String(), "new()", newW, newH, "At()", child.node.State.AtW, child.node.State.AtH)
child.placeWidgets(newW, newH)
- child.showWidgetPlacement("grid2:")
+ // child.showWidgetPlacement("grid2:")
}
- w.showWidgetPlacement("grid3:")
+ // w.showWidgetPlacement("grid3:")
return maxW, maxH
}