diff options
Diffstat (limited to 'sysdata_darwin.go')
| -rw-r--r-- | sysdata_darwin.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sysdata_darwin.go b/sysdata_darwin.go index dba7983..eb3a76f 100644 --- a/sysdata_darwin.go +++ b/sysdata_darwin.go @@ -346,8 +346,10 @@ func (s *sysData) setText(text string) error { return nil } -func (s *sysData) setRect(x int, y int, width int, height int) error { - objc_msgSend_rect(s.id, _setFrame, x, y, width, height) +func (s *sysData) setRect(x int, y int, width int, height int, winheight int) error { + // winheight - y because (0,0) is the bottom-left corner of the window and not the top-left corner + // (winheight - y) - height because (x, y) is the bottom-left corner of the control and not the top-left + objc_msgSend_rect(s.id, _setFrame, x, (winheight - y) - height, width, height) return nil } |
