diff options
| author | Jeff Carr <[email protected]> | 2023-04-05 21:15:05 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2023-04-05 21:15:05 -0500 |
| commit | 4e69499be4bce986f5685ecbf12f662452b95c97 (patch) | |
| tree | df3ed5f76fa2e094119c36e364e7343cdf72a601 /toolkit/gocui/click.go | |
| parent | 0c46d57acdd77965747cfc0e4ffd109332d85c89 (diff) | |
gocui: don't try to draw on add()
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'toolkit/gocui/click.go')
| -rw-r--r-- | toolkit/gocui/click.go | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/toolkit/gocui/click.go b/toolkit/gocui/click.go index 3b5ba09..1ce25a4 100644 --- a/toolkit/gocui/click.go +++ b/toolkit/gocui/click.go @@ -13,7 +13,7 @@ import ( func (w *cuiWidget) doWidgetClick() { switch w.widgetType { case toolkit.Root: - me.rootNode.logicalSize.w1 = 1 + // me.rootNode.logicalSize.w1 = 1 me.rootNode.redoTabs(true) case toolkit.Flag: me.rootNode.redoColor(true) @@ -43,9 +43,9 @@ func (w *cuiWidget) doWidgetClick() { case toolkit.Box: // w.showWidgetPlacement(logNow, "drawTree()") if (w.horizontal) { - log("BOX IS HORIZONTAL", w.nextW, w.nextH, w.name) + log("BOX IS HORIZONTAL", w.name) } else { - log("BOX IS VERTICAL", w.nextW, w.nextH, w.name) + log("BOX IS VERTICAL", w.name) } w.redoBox(true) w.toggleTree() @@ -164,11 +164,10 @@ func ctrlDown(g *gocui.Gui, v *gocui.View) error { if (found == nil) { found = me.rootNode } - found.updateLogicalSizes() - me.ctrlDown.gocuiSize.w0 = found.logicalSize.w0 - me.ctrlDown.gocuiSize.w1 = found.logicalSize.w1 - me.ctrlDown.gocuiSize.h0 = found.logicalSize.h0 - me.ctrlDown.gocuiSize.h1 = found.logicalSize.h1 + me.ctrlDown.gocuiSize.startW = found.gocuiSize.startW + me.ctrlDown.gocuiSize.startH = found.gocuiSize.startH + me.ctrlDown.gocuiSize.width = found.gocuiSize.startW + me.ctrlDown.gocuiSize.height = found.gocuiSize.startH if (me.ctrlDown.v == nil) { me.ctrlDown.text = found.text |
