summaryrefslogtreecommitdiff
path: root/size.go
diff options
context:
space:
mode:
Diffstat (limited to 'size.go')
-rw-r--r--size.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/size.go b/size.go
index ed73cb9..20d4ed8 100644
--- a/size.go
+++ b/size.go
@@ -58,11 +58,11 @@ func (w *guiWidget) sizeGrid() (int, int) {
sizeW, sizeH := child.Size()
// set the child's realWidth, and grid offset
- if w.widths[child.AtW] < sizeW {
- w.widths[child.AtW] = sizeW
+ if w.widths[child.node.State.AtW] < sizeW {
+ w.widths[child.node.State.AtW] = sizeW
}
- if w.heights[child.AtH] < sizeH {
- w.heights[child.AtH] = sizeH
+ if w.heights[child.node.State.AtH] < sizeH {
+ w.heights[child.node.State.AtH] = sizeH
}
}
@@ -73,12 +73,12 @@ func (w *guiWidget) sizeGrid() (int, int) {
for _, child := range w.children {
var totalW, totalH int
for i, w := range w.widths {
- if i < child.AtW {
+ if i < child.node.State.AtW {
totalW += w
}
}
for i, h := range w.heights {
- if i < child.AtH {
+ if i < child.node.State.AtH {
totalH += h
}
}