From 61cd581ff4791e848435d87e47907c184f47298b Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Mon, 11 Aug 2014 12:21:19 -0400 Subject: Added a test for window size to test the small window weirdness of Areas on Mac OS X. --- redo/zz_test.go | 11 +++++++++++ 1 file changed, 11 insertions(+) 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 -- cgit v1.2.3