diff options
| author | Jeff Carr <[email protected]> | 2023-04-05 17:56:27 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2023-04-05 17:56:27 -0500 |
| commit | 6b1de07b09a9fd665249d2b5f72b5216fed06479 (patch) | |
| tree | 5b11e023177cc8b7060822ec8eac0b4248d372c3 | |
| parent | 9c5eda73fa47dfd156c7de3292169150af2f46a8 (diff) | |
gocui: window and tab position kinda correct
Signed-off-by: Jeff Carr <[email protected]>
| -rw-r--r-- | toolkit/gocui/debug.go | 2 | ||||
| -rw-r--r-- | toolkit/gocui/tab.go | 8 |
2 files changed, 7 insertions, 3 deletions
diff --git a/toolkit/gocui/debug.go b/toolkit/gocui/debug.go index 421b84c..4e7bf83 100644 --- a/toolkit/gocui/debug.go +++ b/toolkit/gocui/debug.go @@ -48,7 +48,7 @@ func (w *cuiWidget) showWidgetPlacement(b bool, s string) { s1 = fmt.Sprintf("(wId,pId)=(%2d,%2d) ", w.id, pId) s1 += fmt.Sprintf("W,H()=(%2d,%2d) ", w.startW, w.startH) s1 += fmt.Sprintf("size()=(%2d,%2d) ", w.realWidth, w.realHeight) - s1 += fmt.Sprintf("real()=(%2d,%2d,%2d,%2d) ", w.gocuiSize.w0, w.gocuiSize.h0, w.gocuiSize.w1, w.gocuiSize.h1) + s1 += fmt.Sprintf("gocui()=(%2d,%2d,%2d,%2d) ", w.gocuiSize.w0, w.gocuiSize.h0, w.gocuiSize.w1, w.gocuiSize.h1) switch w.widgetType { case toolkit.Grid: diff --git a/toolkit/gocui/tab.go b/toolkit/gocui/tab.go index 49cd105..b2552b4 100644 --- a/toolkit/gocui/tab.go +++ b/toolkit/gocui/tab.go @@ -58,11 +58,15 @@ func (w *cuiWidget) setTabWH() { startH := 1 for _, child := range me.rootNode.children { + if (child.isFake) { + w.showWidgetPlacement(logNow, "SETTABWH:") + continue + } if (w == child) { w.startW = startW w.startH = startH - w.moveTo(w.startW, w.startH) - w.showWidgetPlacement(logNow, "setTabWH:") + w.setWH() + w.showWidgetPlacement(logNow, "setTABWH:") return } startW += child.realWidth |
