Fix position of AU GUIs.
authorDavid Robillard <d@drobilla.net>
Tue, 23 Dec 2014 22:31:23 +0000 (17:31 -0500)
committerDavid Robillard <d@drobilla.net>
Wed, 24 Dec 2014 18:00:32 +0000 (13:00 -0500)
I'm not sure if this will be right everywhere, but it's perfectly centered for
me and corresponds to the spacing/padding that's present, so it seems right.

gtk2_ardour/au_pluginui.mm

index fc773f54aeef979b84691e4d0c9235ed790c8897..de8219af0fab6ab2755bf342af2aecdb20a3ef21 100644 (file)
@@ -657,7 +657,10 @@ AUPluginUI::parent_cocoa_window ()
 
        /* move the au_view down so that it doesn't overlap the top_box contents */
 
-       NSPoint origin = { 0, static_cast<CGFloat> (a.height) };
+       const int spacing = 6;  // main vbox spacing
+       const int pad     = 4;  // box pad
+
+       NSPoint origin = { spacing + pad, static_cast<CGFloat> (a.height) + (2 * spacing) + pad };
 
        [au_view setFrameOrigin:origin];
         [view addSubview:au_view positioned:NSWindowBelow relativeTo:NULL];