summaryrefslogtreecommitdiff
path: root/place.go
diff options
context:
space:
mode:
Diffstat (limited to 'place.go')
-rw-r--r--place.go22
1 files changed, 11 insertions, 11 deletions
diff --git a/place.go b/place.go
index 11038a1..27fc9e4 100644
--- a/place.go
+++ b/place.go
@@ -203,22 +203,22 @@ func (w *guiWidget) placeGrid(startW int, startH int) (int, int) {
childW, childH := child.placeWidgets(child.startW, child.startH)
// set the child's realWidth, and grid offset
- if w.widths[child.node.State.AtW] < childW {
- w.widths[child.node.State.AtW] = childW
+ if w.widths[child.GridW()] < childW {
+ w.widths[child.GridW()] = childW
}
- if w.heights[child.node.State.AtH] < childH {
- w.heights[child.node.State.AtH] = childH
+ if w.heights[child.GridH()] < childH {
+ w.heights[child.GridH()] = childH
}
if dense {
- if w.heights[child.node.State.AtH] > 0 {
- w.heights[child.node.State.AtH] = 1
+ if w.heights[child.GridH()] > 0 {
+ w.heights[child.GridH()] = 1
} else {
- w.heights[child.node.State.AtH] = 0
+ w.heights[child.GridH()] = 0
}
}
// child.showWidgetPlacement("grid: ")
- log.Log(INFO, "placeGrid:", child.String(), "child()", childW, childH, "At()", child.node.State.AtW, child.node.State.AtH)
+ log.Log(INFO, "placeGrid:", child.String(), "child()", childW, childH, "At()", child.GridW(), child.GridH())
}
var maxW int = 0
@@ -230,12 +230,12 @@ func (w *guiWidget) placeGrid(startW int, startH int) (int, int) {
var totalW, totalH int
for i, w := range w.widths {
- if i < child.node.State.AtW {
+ if i < child.GridW() {
totalW += w
}
}
for i, h := range w.heights {
- if i < child.node.State.AtH {
+ if i < child.GridH() {
totalH += h
}
}
@@ -251,7 +251,7 @@ func (w *guiWidget) placeGrid(startW int, startH int) (int, int) {
maxH = totalH
}
- log.Log(INFO, "placeGrid:", child.String(), "new()", newW, newH, "At()", child.node.State.AtW, child.node.State.AtH)
+ log.Log(INFO, "placeGrid:", child.String(), "new()", newW, newH, "At()", child.GridW(), child.GridH())
child.placeWidgets(newW, newH)
// child.showWidgetPlacement("grid2:")
}