From 962a84e056fd524ed458391961510a1c32892895 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Mon, 3 Mar 2014 17:44:03 -0500 Subject: Fixed Mac OS X control placement flipping. This is done by passing the height of the window around setRect() calls to avoid polling the content view frame each time. --- stack.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'stack.go') diff --git a/stack.go b/stack.go index f66bc3d..171920b 100644 --- a/stack.go +++ b/stack.go @@ -63,7 +63,7 @@ func (s *Stack) make(window *sysData) error { return nil } -func (s *Stack) setRect(x int, y int, width int, height int) error { +func (s *Stack) setRect(x int, y int, width int, height int, winheight int) error { s.lock.Lock() defer s.lock.Unlock() @@ -112,7 +112,7 @@ func (s *Stack) setRect(x int, y int, width int, height int) error { } // 3) now actually place controls for i, c := range s.controls { - err := c.setRect(x, y, s.width[i], s.height[i]) + err := c.setRect(x, y, s.width[i], s.height[i], winheight) if err != nil { return fmt.Errorf("error setting size of control %d in Stack.setRect(): %v", i, err) } -- cgit v1.2.3