summaryrefslogtreecommitdiff
path: root/debug.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-02-05 04:28:42 -0600
committerJeff Carr <[email protected]>2024-02-05 04:28:42 -0600
commit56cebf6db647436734950f157ab286d69bc32486 (patch)
tree144d53c596713337d075592aa23056a3afb283ca /debug.go
parent94b41aa18a230289e30254b3a23b39c88193159a (diff)
inverse logic for sizes of boxes (orientation was wrong)
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'debug.go')
-rw-r--r--debug.go11
1 files changed, 8 insertions, 3 deletions
diff --git a/debug.go b/debug.go
index 48049fe..63c196b 100644
--- a/debug.go
+++ b/debug.go
@@ -36,13 +36,18 @@ func (w *guiWidget) showWidgetPlacement(s string) {
s1 += fmt.Sprintf("gocui=(%2d,%2d,%2d,%2d)",
w.gocuiSize.w0, w.gocuiSize.h0, w.gocuiSize.w1, w.gocuiSize.h1)
} else {
- s1 += fmt.Sprintf(" ")
+ sizeW, sizeH := w.Size()
+ s1 += fmt.Sprintf("size=(%2d,%2d)", sizeW, sizeH)
+ s1 += fmt.Sprintf(" ")
}
if w.node.Parent != nil {
if w.node.Parent.WidgetType == widget.Grid {
s1 += fmt.Sprintf("At(%2d,%2d) ", w.node.State.AtW, w.node.State.AtH)
}
}
- tmp := "." + w.String() + "."
- log.Log(NOW, s1, s, w.node.WidgetType, ",", tmp, "jcarr") // , "text=", w.text)
+ tmp := "." + w.String() + ". " + w.cuiName
+ if w.node.WidgetType == widget.Box {
+ tmp = "." + w.node.State.Direction.String() + ". " + w.cuiName
+ }
+ log.Log(NOW, s1, s, w.node.WidgetType, ",", tmp) //
}