summaryrefslogtreecommitdiff
path: root/toolkit/gocui/common.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2023-04-04 10:38:21 -0500
committerJeff Carr <[email protected]>2023-04-04 10:38:21 -0500
commit8429f76b551ebeb04277f0ae6e5fa68e8f173364 (patch)
treea0dd4255edac7bead6048f59c392561197fa535e /toolkit/gocui/common.go
parentd6b1fa497dcb21e194348d321bfc25f6b128438f (diff)
gocui: grid resize
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'toolkit/gocui/common.go')
-rw-r--r--toolkit/gocui/common.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/toolkit/gocui/common.go b/toolkit/gocui/common.go
index 6d0da27..cfb177b 100644
--- a/toolkit/gocui/common.go
+++ b/toolkit/gocui/common.go
@@ -20,6 +20,10 @@ func setupWidget(a *toolkit.Action) *cuiWidget {
w.width = a.Width
w.height = a.Height
+ t := len(w.text)
+ w.realWidth = t + me.buttonPadding
+ w.realHeight = me.defaultHeight
+
w.widgetType = a.WidgetType
w.id = a.WidgetId
// set the name used by gocui to the id