From 9041a6552e71f8227635897e69c2b2248c687f18 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Thu, 6 Apr 2023 18:44:25 -0500 Subject: [PATCH] gocui: resize works on textbox's Signed-off-by: Jeff Carr --- toolkit/gocui/place.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/toolkit/gocui/place.go b/toolkit/gocui/place.go index 32a9004..9036771 100644 --- a/toolkit/gocui/place.go +++ b/toolkit/gocui/place.go @@ -168,7 +168,14 @@ func (w *cuiWidget) placeWidgets() { w.nextH = p.nextH w.gocuiSize.w0 = w.startW w.gocuiSize.h0 = w.startH - w.setWH() + w.gocuiSize.w1 = w.gocuiSize.w0 + w.gocuiSize.width + w.gocuiSize.h1 = w.gocuiSize.h0 + w.gocuiSize.height + if (w.realWidth < w.gocuiSize.width) { + w.realWidth = w.gocuiSize.width + } + if (w.realHeight < w.gocuiSize.height) { + w.realHeight = w.gocuiSize.height + } w.showWidgetPlacement(logNow, "place()") } }