diff options
| author | Jeff Carr <[email protected]> | 2023-04-05 18:10:53 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2023-04-05 18:10:53 -0500 |
| commit | 56c45d93e435e1ab121cf2fad26e48312fff9244 (patch) | |
| tree | 2ebe899b2b85da8b16ed116fb874c386effa08ec /toolkit/gocui/place.go | |
| parent | 6b1de07b09a9fd665249d2b5f72b5216fed06479 (diff) | |
gocui: store more in w.gocuiSize.
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'toolkit/gocui/place.go')
| -rw-r--r-- | toolkit/gocui/place.go | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/toolkit/gocui/place.go b/toolkit/gocui/place.go index bee9063..2d0967d 100644 --- a/toolkit/gocui/place.go +++ b/toolkit/gocui/place.go @@ -15,8 +15,11 @@ func (w *cuiWidget) setFake() { // setup fake labels for non-visable things off screen w.realWidth = t + 2 w.realHeight = me.defaultHeight - w.startW = fakeStartWidth - w.startH = fakeStartHeight + + w.gocuiSize.width = t + 2 + w.gocuiSize.height = me.defaultHeight + w.gocuiSize.startW = fakeStartWidth + w.gocuiSize.startH = fakeStartHeight fakeStartHeight += 3 if (fakeStartHeight > 24) { @@ -194,10 +197,10 @@ func (w *cuiWidget) redoBox(draw bool) { } func (w *cuiWidget) setWH() { - w.gocuiSize.w0 = w.startW - w.gocuiSize.h0 = w.startH - w.gocuiSize.w1 = w.gocuiSize.w0 + w.realWidth - w.gocuiSize.h1 = w.gocuiSize.h0 + w.realHeight + w.gocuiSize.w0 = w.gocuiSize.startW + w.gocuiSize.h0 = w.gocuiSize.startH + w.gocuiSize.w1 = w.gocuiSize.w0 + w.gocuiSize.width + w.gocuiSize.h1 = w.gocuiSize.h0 + w.gocuiSize.height w.logicalSize.w0 = w.gocuiSize.w0 w.logicalSize.h0 = w.gocuiSize.h0 |
