summaryrefslogtreecommitdiff
path: root/toolkit/gocui/debug.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2023-12-16 06:57:39 -0600
committerJeff Carr <[email protected]>2023-12-16 06:57:39 -0600
commit87ab9a958d9eb9f4db35d5c9f9ce923df3132dad (patch)
treefd3ee29d828e9e69175a6ca04fec6ae0fe60fcc0 /toolkit/gocui/debug.go
parentdcce32583387be7fc4f6cd8c8dea62fd7dc42ecf (diff)
gocui: fixes to labels + line entriesv0.8.8.1v0.8.8
correct line hight dump non-working size rectangle code somehow works better better dropdown menu debugging minor fixes to common.go more common code Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'toolkit/gocui/debug.go')
-rw-r--r--toolkit/gocui/debug.go9
1 files changed, 4 insertions, 5 deletions
diff --git a/toolkit/gocui/debug.go b/toolkit/gocui/debug.go
index 3ea31b0..7512c1e 100644
--- a/toolkit/gocui/debug.go
+++ b/toolkit/gocui/debug.go
@@ -10,7 +10,7 @@ func (n *node) dumpTree(draw bool) {
if (w == nil) {
return
}
- n.showWidgetPlacement(logNow, "Tree:")
+ n.showWidgetPlacement(logNow, "dumpTree()")
for _, child := range n.children {
child.dumpTree(draw)
@@ -33,13 +33,12 @@ func (n *node) showWidgetPlacement(b bool, s string) {
pId = n.parent.WidgetId
}
s1 = fmt.Sprintf("(wId,pId)=(%2d,%2d) ", n.WidgetId, pId)
- s1 += fmt.Sprintf("size=(%2d,%2d)(%2d,%2d,%2d,%2d)",
- w.size.Width(), w.size.Height(),
- w.size.w0, w.size.h0, w.size.w1, w.size.h1)
if n.Visible() {
s1 += fmt.Sprintf("gocui=(%2d,%2d)(%2d,%2d,%2d,%2d)",
w.gocuiSize.Width(), w.gocuiSize.Height(),
w.gocuiSize.w0, w.gocuiSize.h0, w.gocuiSize.w1, w.gocuiSize.h1)
+ } else {
+ s1 += fmt.Sprintf(" ")
}
if (n.parent != nil) {
if (n.parent.WidgetType == toolkit.Grid) {
@@ -50,7 +49,7 @@ func (n *node) showWidgetPlacement(b bool, s string) {
}
func (n *node) dumpWidget(pad string) {
- log(true, "node:", pad, n.WidgetId, "At(", n.AtW, n.AtH, ") ,", n.WidgetType, ",", n.Name)
+ log(true, "node:", pad, n.WidgetId, "At(", n.AtW, n.AtH, ") ,", n.WidgetType, ", n.Name =", n.Name, ", n.Text =", n.Text)
}
func (n *node) listWidgets() {