mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 06:44:57 +01:00
Fix AudioUnit window size for some non-resizable plugins
Some fixed size AU, do unset `autoresizesSubviews` (Apple's default is enabled). This also results in the initial size, and position below Ardour's toolbar to be set incorrectly. This fixes e.g. Reason Rack Plug AU (and maybe others).
This commit is contained in:
parent
abfceea98c
commit
aef366c156
1 changed files with 13 additions and 0 deletions
|
|
@ -862,6 +862,13 @@ AUPluginUI::cocoa_view_resized ()
|
|||
last_au_frame.origin.y != new_frame.origin.y) {
|
||||
new_frame.origin = last_au_frame.origin;
|
||||
[au_view setFrame:new_frame];
|
||||
|
||||
NSArray* subviews = [au_view subviews];
|
||||
for (unsigned long i = 0; i < [subviews count]; ++i) {
|
||||
NSView* subview = [subviews objectAtIndex:i];
|
||||
[subview setFrame:NSMakeRect (0, 0, new_frame.size.width, new_frame.size.height)];
|
||||
}
|
||||
|
||||
/* also be sure to redraw the topbox because this can
|
||||
also go wrong.
|
||||
*/
|
||||
|
|
@ -1081,6 +1088,12 @@ AUPluginUI::parent_cocoa_window ()
|
|||
0, 0, &xx, &yy);
|
||||
[au_view setFrame:NSMakeRect(xx, yy, req_width, req_height)];
|
||||
|
||||
NSArray* subviews = [au_view subviews];
|
||||
for (unsigned long i = 0; i < [subviews count]; ++i) {
|
||||
NSView* subview = [subviews objectAtIndex:i];
|
||||
[subview setFrame:NSMakeRect (0, 0, req_width, req_height)];
|
||||
}
|
||||
|
||||
last_au_frame = [au_view frame];
|
||||
// watch for size changes of the view
|
||||
_notify = [ [NotificationObject alloc] initWithPluginUI:this andCocoaParent:NULL andTopLevelParent:win ];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue