diff options
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 } } |
