diff options
| author | Pietro Gagliardi <[email protected]> | 2014-10-18 17:02:51 -0400 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-10-18 17:02:51 -0400 |
| commit | 8c8b642adbed274133b6e9d975c7ca8786300d2c (patch) | |
| tree | fa64294c47863013ee1a76d7525afeb50a0733c7 /newctrl/container_darwin.m | |
| parent | 922407d5b6e8093d6f6239e43d50b7e20b38c748 (diff) | |
Fixed Mac OS X sizing and more TODOs. Ready to merge back!
Diffstat (limited to 'newctrl/container_darwin.m')
| -rw-r--r-- | newctrl/container_darwin.m | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/newctrl/container_darwin.m b/newctrl/container_darwin.m index c5a50e1..1dfa7cb 100644 --- a/newctrl/container_darwin.m +++ b/newctrl/container_darwin.m @@ -34,7 +34,14 @@ id newContainerView(void *gocontainer) void moveControl(id c, intptr_t x, intptr_t y, intptr_t width, intptr_t height) { - [toNSView(c) setFrame:NSMakeRect((CGFloat) x, (CGFloat) y, (CGFloat) width, (CGFloat) height)]; + NSView *v; + NSRect frame; + + frame = NSMakeRect((CGFloat) x, (CGFloat) y, (CGFloat) width, (CGFloat) height); + // mac os x coordinate system has (0,0) in the lower-left + v = toNSView(c); + frame.origin.y = ([[v superview] bounds].size.height - frame.size.height) - frame.origin.y; + [v setFrame:frame]; } struct xrect containerBounds(id view) |
