summaryrefslogtreecommitdiff
path: root/node.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2023-05-09 18:34:09 -0500
committerJeff Carr <[email protected]>2023-05-09 18:34:09 -0500
commitb392c40969e105b00efa262042d647303d6fbc2c (patch)
tree95e25e5e288c096df69c36e2293af5ebc17a1d78 /node.go
parent706bcef867ff2a26ab62a1e3d668ac441575df62 (diff)
andlabs: now attempt grid placement
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'node.go')
-rw-r--r--node.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/node.go b/node.go
index f9b35a9..93d0ca8 100644
--- a/node.go
+++ b/node.go
@@ -12,6 +12,12 @@ func (n *Node) newNode(title string, t toolkit.WidgetType, custom func()) *Node
newN.WidgetType = t
newN.Custom = custom
+ if n.WidgetType == toolkit.Grid {
+ n.gridIncrement()
+ }
+ newN.AtW = n.NextW
+ newN.AtH = n.NextH
+
n.children = append(n.children, newN)
newN.parent = n
return newN