diff options
| author | Jeff Carr <[email protected]> | 2023-04-05 17:29:52 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2023-04-05 17:29:52 -0500 |
| commit | 9c5eda73fa47dfd156c7de3292169150af2f46a8 (patch) | |
| tree | 7b83a644451570c037401d55c425e5c2af50e560 /toolkit/gocui/place.go | |
| parent | 89bff61cb1373035f7a20b05dd975f8dfbbb767a (diff) | |
gocui: more dumb and broken attempts at fixing this code
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'toolkit/gocui/place.go')
| -rw-r--r-- | toolkit/gocui/place.go | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/toolkit/gocui/place.go b/toolkit/gocui/place.go index 5747284..bee9063 100644 --- a/toolkit/gocui/place.go +++ b/toolkit/gocui/place.go @@ -15,15 +15,15 @@ func (w *cuiWidget) setFake() { // setup fake labels for non-visable things off screen w.realWidth = t + 2 w.realHeight = me.defaultHeight - w.gocuiSize.w0 = fakeStartWidth - w.gocuiSize.h0 = fakeStartHeight - w.gocuiSize.w1 = w.gocuiSize.w0 + w.realWidth - w.gocuiSize.h1 = w.gocuiSize.h0 + w.realHeight + w.startW = fakeStartWidth + w.startH = fakeStartHeight + fakeStartHeight += 3 if (fakeStartHeight > 24) { fakeStartHeight = 3 fakeStartWidth += 20 } + w.setWH() w.showWidgetPlacement(logNow, "setFake()") } @@ -193,6 +193,18 @@ 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.logicalSize.w0 = w.gocuiSize.w0 + w.logicalSize.h0 = w.gocuiSize.h0 + w.logicalSize.w1 = w.gocuiSize.w1 + w.logicalSize.h1 = w.gocuiSize.h1 +} + func (w *cuiWidget) moveTo(leftW int, topH int) { if (w.isFake) { // don't ever move these |
