diff options
| author | Jeff Carr <[email protected]> | 2025-02-04 09:40:51 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-02-04 09:40:51 -0600 |
| commit | 5a28806bdf79f360e43deb45f3e68623fb3e45a2 (patch) | |
| tree | f33fd3f3cc254f85866b16167c15206c306008b8 /find.go | |
| parent | d2c681f573a44c5cd572dc8e0d6f470c0cda10ff (diff) | |
getting closer on windows
Diffstat (limited to 'find.go')
| -rw-r--r-- | find.go | 39 |
1 files changed, 39 insertions, 0 deletions
@@ -5,6 +5,7 @@ package main import ( "github.com/awesome-gocui/gocui" + log "go.wit.com/log" "go.wit.com/widget" ) @@ -57,6 +58,44 @@ func (tk *guiWidget) findByXYreal(w int, h int) []*guiWidget { return widgets } +func (tk *guiWidget) setFullSize() rectType { + r := tk.getFullSize() + + /* + r.w0 = tk.gocuiSize.w0 + r.w1 = tk.gocuiSize.w1 + r.h0 = tk.gocuiSize.h0 + r.h1 = tk.gocuiSize.h1 + */ + var changed bool + if tk.gocuiSize.w0 != r.w0 { + tk.gocuiSize.w0 = r.w0 + changed = true + } + if tk.gocuiSize.w1 != r.w1 { + tk.gocuiSize.w1 = r.w1 + changed = true + } + if tk.gocuiSize.h0 != r.h0 { + tk.gocuiSize.h0 = r.h0 + changed = true + } + if tk.gocuiSize.h1 != r.h1 { + tk.gocuiSize.h1 = r.h1 + changed = true + } + if changed { + if tk.node.WidgetType == widget.Window { + log.Info("REDRAW WINDOW IN setFullSize()") + tk.gocuiSize.w1 = r.w1 + 2 + tk.gocuiSize.h1 = r.h1 + 1 + tk.Hide() + tk.drawView() + } + } + return r +} + // this checks a widget to see if it is under (W,H), then checks the widget's children // anything that matches is passed back as an array of widgets func (tk *guiWidget) getFullSize() rectType { |
