From e39bcafb78d8388ee5bc77366efbab4f3717466c Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Thu, 6 Feb 2025 19:58:48 -0600 Subject: [PATCH] closer to accurate grid sizes --- place.go | 3 +++ size.go | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/place.go b/place.go index 450fec4..8d15308 100644 --- a/place.go +++ b/place.go @@ -71,6 +71,9 @@ func (tk *guiWidget) placeWidgets(startW int, startH int) (int, int) { if me.treeRoot == nil { return 0, 0 } + if tk.Hidden() { + return 0, 0 + } tk.startW = startW tk.startH = startH diff --git a/size.go b/size.go index 2dd7332..064d2ae 100644 --- a/size.go +++ b/size.go @@ -98,8 +98,6 @@ func (w *guiWidget) sizeGrid() (int, int) { } sizeW, sizeH := child.Size() - sizeW += 2 - // set the child's realWidth, and grid offset if w.widths[child.node.State.AtW] < sizeW { w.widths[child.node.State.AtW] = sizeW