diff options
| author | Jeff Carr <[email protected]> | 2025-02-05 12:32:41 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-02-05 12:32:41 -0600 |
| commit | f1eefc9a06880784269424bd5d8156ce7820b40d (patch) | |
| tree | a9f4babf2b1c775ab3e09eace36de800f4e3f8ed /window.go | |
| parent | 6a0fd773f41bb0d8892f30f022098a24ffdc562e (diff) | |
move code to better homes
Diffstat (limited to 'window.go')
| -rw-r--r-- | window.go | 15 |
1 files changed, 9 insertions, 6 deletions
@@ -13,8 +13,13 @@ func (tk *guiWidget) redrawWindow(w int, h int) { if tk.node.WidgetType != widget.Window { return } - tk.gocuiSize.w0 = w - 2 - tk.gocuiSize.h0 = h - 1 + // pin the window to (w,h) + tk.gocuiSize.w0 = w + tk.gocuiSize.h0 = h + tk.force.w0 = w + tk.force.w1 = w + tk.force.h0 = h + tk.force.h1 = h tk.setFullSize() // might make the green box the right size @@ -34,14 +39,12 @@ func (tk *guiWidget) redrawWindow(w int, h int) { // re-draws the buttons for each of the windows func redoWindows(nextW int, nextH int) { for _, win := range findWindows() { - win.gocuiSize.w0 = nextW - win.gocuiSize.h0 = nextH - win.dumpWidget(fmt.Sprintf("redoWindowsS (%d,%d)", nextW, nextH)) win.redrawWindow(nextW, nextH) win.dumpWidget(fmt.Sprintf("redoWindowsE (%d,%d)", nextW, nextH)) // increment the width for the next window - nextW += win.gocuiSize.Width() + 4 + nextW += 40 + nextH += 10 } } |
