diff options
| author | Jeff Carr <[email protected]> | 2024-01-28 21:22:34 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-01-28 21:22:34 -0600 |
| commit | 9aa1dd1a37d38d37aeafc8f26e14ccc739396883 (patch) | |
| tree | 4103c7a4584f3c81ea1cac06fe0f0ec32a8f584e | |
| parent | 4fa1dd75b04aad0a85d171a1d333d799a61ba713 (diff) | |
grid size works
Signed-off-by: Jeff Carr <[email protected]>
| -rw-r--r-- | size.go | 31 |
1 files changed, 8 insertions, 23 deletions
@@ -66,31 +66,16 @@ func (w *guiWidget) sizeGrid() (int, int) { } } - var maxW int = 0 - var maxH int = 0 - // find the width and height offset of the grid for AtW,AtH - for _, child := range w.children { - var totalW, totalH int - for i, w := range w.widths { - if i < child.node.State.AtW { - totalW += w - } - } - for i, h := range w.heights { - if i < child.node.State.AtH { - totalH += h - } - } - - if totalW > maxW { - maxW = totalW - } - if totalH > maxH { - maxH = totalH - } + var totalW int = 0 + var totalH int = 0 + for _, width := range w.widths { + totalW += width } - return maxW, maxH + for _, h := range w.heights { + totalH += h + } + return totalW, totalH } func (tk *guiWidget) sizeBox() (int, int) { |
