diff options
| author | Pietro Gagliardi <[email protected]> | 2014-03-03 17:44:03 -0500 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-03-03 17:44:03 -0500 |
| commit | 962a84e056fd524ed458391961510a1c32892895 (patch) | |
| tree | 515e6e1b6ad5662b99291f8132edc2afd9ca6e91 /sysdata_windows.go | |
| parent | 6c3389283138cb4baf5ccc3d5785c318e376f26f (diff) | |
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.
Diffstat (limited to 'sysdata_windows.go')
| -rw-r--r-- | sysdata_windows.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sysdata_windows.go b/sysdata_windows.go index b541bee..b14161d 100644 --- a/sysdata_windows.go +++ b/sysdata_windows.go @@ -251,7 +251,7 @@ func (s *sysData) setText(text string) error { return nil } -func (s *sysData) setRect(x int, y int, width int, height int) error { +func (s *sysData) setRect(x int, y int, width int, height int, winheight int) error { r1, _, err := _moveWindow.Call( uintptr(s.hwnd), uintptr(x), @@ -481,7 +481,8 @@ func (s *sysData) setWindowSize(width int, height int) error { if r.ret == 0 { return fmt.Errorf("error getting upper-left of window for resize: %v", r.err) } - err := s.setRect(int(rect.Left), int(rect.Top), width, height) + // 0 because (0,0) is top-left so no winheight + err := s.setRect(int(rect.Left), int(rect.Top), width, height, 0) if err != nil { return fmt.Errorf("error actually resizing window: %v", err) } |
