summaryrefslogtreecommitdiff
path: root/window.go
diff options
context:
space:
mode:
Diffstat (limited to 'window.go')
-rw-r--r--window.go29
1 files changed, 21 insertions, 8 deletions
diff --git a/window.go b/window.go
index 36e1aed..ed9debe 100644
--- a/window.go
+++ b/window.go
@@ -4,18 +4,23 @@
package main
import (
+ "fmt"
+
"go.wit.com/widget"
)
// re-draws the buttons for each of the windows
-func (w *guiWidget) redoWindows(nextW int, nextH int) {
- var startW int = nextW
- var startH int = nextH
+func (tk *guiWidget) redoWindows(nextW int, nextH int) {
- for _, child := range w.children {
+ for _, child := range tk.children {
if child.node.WidgetType != widget.Window {
continue
}
+ child.gocuiSize.w0 = nextW
+ child.gocuiSize.h0 = nextH
+
+ tmp := fmt.Sprintf("redoWindowsS (%d,%d)", nextW, nextH)
+ child.dumpWidget(tmp)
child.frame = false
child.hasTabs = false
@@ -23,10 +28,18 @@ func (w *guiWidget) redoWindows(nextW int, nextH int) {
// this should make the window the full size and re-draw it
child.setFullSize() // child.gocuiSetWH(nextW, nextH)
child.Hide()
- child.drawView()
+ child.DrawAt(nextW, nextH)
+ child.Show()
+
+ tmp = fmt.Sprintf("redoWindowsE (%d,%d)", nextW, nextH)
+ child.dumpWidget(tmp)
- sizeW := child.gocuiSize.Width()
- nextW += sizeW + 4
- child.redoWindows(startW+3, startH+2)
+ nextW += child.gocuiSize.Width() + 4
+ child.redoWindows(nextW, nextH)
+ /*
+ sizeW := child.gocuiSize.Width()
+ nextW += sizeW + 4
+ child.redoWindows(startW+3, startH+2)
+ */
}
}