summaryrefslogtreecommitdiff
path: root/place.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-02-01 17:58:13 -0600
committerJeff Carr <[email protected]>2025-02-01 17:58:13 -0600
commit5a2097d08053cbfc0d4c05fb7fec72d43ea7e5eb (patch)
treebb9076533ce92900fe633abe117226f3a2b886d3 /place.go
parent9a3f9d0991df81a7259801905b7febc2bebe03e8 (diff)
trying stuff that isn't working
Diffstat (limited to 'place.go')
-rw-r--r--place.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/place.go b/place.go
index 35b045a..e0c3097 100644
--- a/place.go
+++ b/place.go
@@ -97,6 +97,9 @@ func (tk *guiWidget) placeWidgets(startW int, startH int) (int, int) {
case widget.Box:
tk.placeBox(startW, startH)
return 0, 0
+ case widget.Stdout:
+ tk.setStdoutWH(startW, startH)
+ return tk.gocuiSize.Width(), tk.gocuiSize.Height()
case widget.Group:
// move the group to the parent's next location
tk.gocuiSetWH(startW, startH)
@@ -265,3 +268,13 @@ func (tk *guiWidget) gocuiSetWH(sizeW, sizeH int) {
tk.gocuiSize.h1 = tk.gocuiSize.h0 + h + 1
}
}
+
+func (tk *guiWidget) setStdoutWH(sizeW, sizeH int) {
+ w := 120
+ h := 40
+
+ tk.gocuiSize.w0 = sizeW
+ tk.gocuiSize.h0 = sizeH
+ tk.gocuiSize.w1 = tk.gocuiSize.w0 + w
+ tk.gocuiSize.h1 = tk.gocuiSize.h0 + h
+}