summaryrefslogtreecommitdiff
path: root/gocui/place.go
diff options
context:
space:
mode:
Diffstat (limited to 'gocui/place.go')
-rw-r--r--gocui/place.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/gocui/place.go b/gocui/place.go
index 80b03ca..8780bbe 100644
--- a/gocui/place.go
+++ b/gocui/place.go
@@ -21,12 +21,12 @@ func (n *node) placeBox(startW int, startH int) {
newR := child.realGocuiSize()
w := newR.w1 - newR.w0
h := newR.h1 - newR.h0
- if (n.horizontal) {
- log.Log(NOW, "BOX IS HORIZONTAL", n.Name, "newWH()", newW, newH, "child()", w, h, child.Name)
+ if (n.direction == widget.Horizontal) {
+ log.Log(NOW, "BOX IS HORIZONTAL", n.progname, "newWH()", newW, newH, "child()", w, h, child.progname)
// expand based on the child width
newW += w
} else {
- log.Log(NOW, "BOX IS VERTICAL ", n.Name, "newWH()", newW, newH, "child()", w, h, child.Name)
+ log.Log(NOW, "BOX IS VERTICAL ", n.progname, "newWH()", newW, newH, "child()", w, h, child.progname)
// expand based on the child height
newH += h
}
@@ -105,7 +105,7 @@ func (n *node) placeGrid(startW int, startH int) {
w.heights[child.AtH] = childH
}
// child.showWidgetPlacement(logInfo, "grid: ")
- log.Log(INFO, "placeGrid:", child.Name, "child()", childW, childH, "At()", child.AtW, child.AtH)
+ log.Log(INFO, "placeGrid:", child.progname, "child()", childW, childH, "At()", child.AtW, child.AtH)
}
// find the width and height offset of the grid for AtW,AtH
@@ -128,7 +128,7 @@ func (n *node) placeGrid(startW int, startH int) {
newW := startW + totalW
newH := startH + totalH
- log.Log(INFO, "placeGrid:", child.Name, "new()", newW, newH, "At()", child.AtW, child.AtH)
+ log.Log(INFO, "placeGrid:", child.progname, "new()", newW, newH, "At()", child.AtW, child.AtH)
child.placeWidgets(newW, newH)
child.showWidgetPlacement(true, "grid2:")
}
@@ -178,7 +178,7 @@ func (n *node) realGocuiSize() *rectType {
func (n *node) textSize() (int, int) {
var width, height int
- for _, s := range strings.Split(n.Text, "\n") {
+ for _, s := range strings.Split(widget.GetString(n.value), "\n") {
if (width < len(s)) {
width = len(s)
}