From dab898f0f945fc3b0a5747f38b7f22b59d539117 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Sun, 28 Jan 2024 13:14:43 -0600 Subject: cleaner debugging Signed-off-by: Jeff Carr --- place.go | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'place.go') diff --git a/place.go b/place.go index b6b96da..f826472 100644 --- a/place.go +++ b/place.go @@ -12,13 +12,13 @@ func (tk *guiWidget) placeBox(startW int, startH int) { if tk.WidgetType != widget.Box { return } - tk.showWidgetPlacement(true, "boxS()") + tk.showWidgetPlacement("boxS()") newW := startW newH := startH for _, child := range tk.children { child.placeWidgets(newW, newH) - // n.showWidgetPlacement(logNow, "boxS()") + // n.showWidgetPlacement("boxS()") newR := child.realGocuiSize() w := newR.w1 - newR.w0 h := newR.h1 - newR.h0 @@ -36,7 +36,7 @@ func (tk *guiWidget) placeBox(startW int, startH int) { // just compute this every time? // newR := n.realGocuiSize() - tk.showWidgetPlacement(true, "boxE()") + tk.showWidgetPlacement("boxE()") } func (tk *guiWidget) placeWidgets(startW int, startH int) { @@ -65,7 +65,7 @@ func (tk *guiWidget) placeWidgets(startW int, startH int) { case widget.Group: // move the group to the parent's next location tk.gocuiSetWH(startW, startH) - tk.showWidgetPlacement(true, "group()") + tk.showWidgetPlacement("group()") newW := startW + me.GroupPadW newH := startH + 3 // normal hight of the group label @@ -86,7 +86,7 @@ func (tk *guiWidget) placeWidgets(startW int, startH int) { } func (w *guiWidget) placeGrid(startW int, startH int) { - w.showWidgetPlacement(true, "grid0:") + w.showWidgetPlacement("grid0:") if w.WidgetType != widget.Grid { return } @@ -104,13 +104,13 @@ func (w *guiWidget) placeGrid(startW int, startH int) { if w.heights[child.AtH] < childH { w.heights[child.AtH] = childH } - // child.showWidgetPlacement(logInfo, "grid: ") + // child.showWidgetPlacement("grid: ") log.Log(INFO, "placeGrid:", child.String(), "child()", childW, childH, "At()", child.AtW, child.AtH) } // find the width and height offset of the grid for AtW,AtH for _, child := range w.children { - child.showWidgetPlacement(true, "grid1:") + child.showWidgetPlacement("grid1:") var totalW, totalH int for i, w := range w.widths { @@ -130,9 +130,9 @@ func (w *guiWidget) placeGrid(startW int, startH int) { log.Log(INFO, "placeGrid:", child.String(), "new()", newW, newH, "At()", child.AtW, child.AtH) child.placeWidgets(newW, newH) - child.showWidgetPlacement(true, "grid2:") + child.showWidgetPlacement("grid2:") } - w.showWidgetPlacement(true, "grid3:") + w.showWidgetPlacement("grid3:") } // computes the real, actual size of all the gocli objects in a widget -- cgit v1.2.3