summaryrefslogtreecommitdiff
path: root/toolkit/gocui/place.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2023-12-16 06:57:39 -0600
committerJeff Carr <[email protected]>2023-12-16 06:57:39 -0600
commit87ab9a958d9eb9f4db35d5c9f9ce923df3132dad (patch)
treefd3ee29d828e9e69175a6ca04fec6ae0fe60fcc0 /toolkit/gocui/place.go
parentdcce32583387be7fc4f6cd8c8dea62fd7dc42ecf (diff)
gocui: fixes to labels + line entriesv0.8.8.1v0.8.8
correct line hight dump non-working size rectangle code somehow works better better dropdown menu debugging minor fixes to common.go more common code Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'toolkit/gocui/place.go')
-rw-r--r--toolkit/gocui/place.go16
1 files changed, 3 insertions, 13 deletions
diff --git a/toolkit/gocui/place.go b/toolkit/gocui/place.go
index d02624e..f020257 100644
--- a/toolkit/gocui/place.go
+++ b/toolkit/gocui/place.go
@@ -9,8 +9,6 @@ func (n *node) placeBox(startW int, startH int) {
if (n.WidgetType != toolkit.Box) {
return
}
- n.tk.size.w0 = startW
- n.tk.size.h0 = startH
n.showWidgetPlacement(logNow, "boxS()")
newW := startW
@@ -18,7 +16,6 @@ func (n *node) placeBox(startW int, startH int) {
for _, child := range n.children {
child.placeWidgets(newW, newH)
// n.showWidgetPlacement(logNow, "boxS()")
- // w,h := child.logicalSize()
newR := child.realGocuiSize()
w := newR.w1 - newR.w0
h := newR.h1 - newR.h0
@@ -32,13 +29,10 @@ func (n *node) placeBox(startW int, startH int) {
newH += h
}
}
- // w,h := n.logicalSize()
- newR := n.realGocuiSize()
- w := newR.w1 - newR.w0
- h := newR.h1 - newR.h0
- n.tk.size.w1 = n.tk.size.w0 + w
- n.tk.size.h1 = n.tk.size.h0 + h
+ // just compute this every time?
+ // newR := n.realGocuiSize()
+
n.showWidgetPlacement(logNow, "boxE()")
}
@@ -75,7 +69,6 @@ func (n *node) placeWidgets(startW int, startH int) {
// now move all the children aka: run place() on them
for _, child := range n.children {
child.placeWidgets(newW, newH)
- // _,h := child.logicalSize()
newR := child.realGocuiSize()
// w := newR.w1 - newR.w0
h := newR.h1 - newR.h0
@@ -91,8 +84,6 @@ func (n *node) placeWidgets(startW int, startH int) {
func (n *node) placeGrid(startW int, startH int) {
w := n.tk
- w.size.w0 = startW
- w.size.h0 = startH
n.showWidgetPlacement(logInfo, "grid0:")
if (n.WidgetType != toolkit.Grid) {
return
@@ -100,7 +91,6 @@ func (n *node) placeGrid(startW int, startH int) {
// first compute the max sizes of the rows and columns
for _, child := range n.children {
- // childW, childH := child.logicalSize()
newR := child.realGocuiSize()
childW := newR.w1 - newR.w0
childH := newR.h1 - newR.h0