diff options
| author | Jeff Carr <[email protected]> | 2024-02-05 07:31:04 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-02-05 07:31:04 -0600 |
| commit | cf72809e26d25380be0e9a05f81c8780f7538d37 (patch) | |
| tree | 995b536a11fcbb54fbb1dfec753769810bbff927 /size.go | |
| parent | 825be13ee98bff8a981a905afa3a4f6402cf10ca (diff) | |
use treeNode.Hidden()
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'size.go')
| -rw-r--r-- | size.go | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -13,7 +13,7 @@ func (tk *guiWidget) Size() (int, int) { } // don't count hidden widgets in size calculations - if tk.hidden { + if tk.node.Hidden() { return 0, 0 } @@ -22,7 +22,7 @@ func (tk *guiWidget) Size() (int, int) { var maxH int = 0 var maxW int = 0 for _, child := range tk.children { - if tk.hidden { + if tk.node.Hidden() { continue } sizeW, sizeH := child.Size() @@ -43,7 +43,7 @@ func (tk *guiWidget) Size() (int, int) { maxH := tk.gocuiSize.Height() for _, child := range tk.children { - if tk.hidden { + if tk.node.Hidden() { continue } sizeW, sizeH := child.Size() @@ -67,13 +67,13 @@ func (tk *guiWidget) Size() (int, int) { } func (w *guiWidget) sizeGrid() (int, int) { - if w.hidden { + if w.node.Hidden() { return 0, 0 } // first compute the max sizes of the rows and columns for _, child := range w.children { - if w.hidden { + if w.node.Hidden() { continue } sizeW, sizeH := child.Size() @@ -105,14 +105,14 @@ func (w *guiWidget) sizeBox() (int, int) { if w.WidgetType != widget.Box { return 0, 0 } - if w.hidden { + if w.node.Hidden() { return 0, 0 } var maxW int = 0 var maxH int = 0 for _, child := range w.children { - if w.hidden { + if w.node.Hidden() { continue } sizeW, sizeH := child.Size() |
