summaryrefslogtreecommitdiff
path: root/redo
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-08-11 12:21:19 -0400
committerPietro Gagliardi <[email protected]>2014-08-11 12:21:19 -0400
commit61cd581ff4791e848435d87e47907c184f47298b (patch)
treed11c0ad5fed2e44ad34f86d9a372f9c3a8835ad1 /redo
parent3ebbae73ec0d36e4a48549bd61df7dbf1e66451b (diff)
Added a test for window size to test the small window weirdness of Areas on Mac OS X.
Diffstat (limited to 'redo')
-rw-r--r--redo/zz_test.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/redo/zz_test.go b/redo/zz_test.go
index 0dc1421..cc269b9 100644
--- a/redo/zz_test.go
+++ b/redo/zz_test.go
@@ -15,6 +15,7 @@ import (
)
var closeOnClick = flag.Bool("close", false, "close on click")
+var smallWindow = flag.Bool("small", false, "open a small window (test Mac OS X initial control sizing)")
type dtype struct {
Name string
@@ -42,6 +43,8 @@ type testwin struct {
c Checkbox
e TextField
e2 TextField
+
+ wsmall Window
}
type areaHandler struct{}
@@ -131,6 +134,14 @@ func (tw *testwin) make(done chan struct{}) {
tw.e2 = NewPasswordField()
tw.t.Append("Password Field", tw.e2)
tw.w.Show()
+ if *smallWindow {
+ tw.wsmall = NewWindow("Small", 80, 80,
+ NewVerticalStack(
+ NewButton("Small"),
+ NewButton("Small"),
+ NewArea(200, 200, &areaHandler{})))
+ tw.wsmall.Show()
+ }
}
// because Cocoa hates being run off the main thread, even if it's run exclusively off the main thread