mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-16 19:56:31 +01:00
NO-OP: whitespace
This commit is contained in:
parent
d279e2d333
commit
d627e00ff6
1 changed files with 38 additions and 38 deletions
|
|
@ -777,17 +777,17 @@ AUPluginUI::stop_cf_timer ()
|
||||||
void
|
void
|
||||||
AUPluginUI::cocoa_view_resized ()
|
AUPluginUI::cocoa_view_resized ()
|
||||||
{
|
{
|
||||||
/* we can get here for two reasons:
|
/* we can get here for two reasons:
|
||||||
|
*
|
||||||
1) the plugin window was resized by the user, a new size was
|
* 1) the plugin window was resized by the user, a new size was
|
||||||
allocated to the window, ::update_view_size() was called, and we
|
* allocated to the window, ::update_view_size() was called, and we
|
||||||
explicitly/manually resized the AU NSView.
|
* explicitly/manually resized the AU NSView.
|
||||||
|
*
|
||||||
2) the plugin decided to resize itself (probably in response to user
|
* 2) the plugin decided to resize itself (probably in response to user
|
||||||
action, but not in response to an actual window resize)
|
* action, but not in response to an actual window resize)
|
||||||
|
*
|
||||||
We only want to proceed with a window resizing in the second case.
|
* We only want to proceed with a window resizing in the second case.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (in_live_resize) {
|
if (in_live_resize) {
|
||||||
/* ::update_view_size() will be called at the right times and
|
/* ::update_view_size() will be called at the right times and
|
||||||
|
|
@ -825,7 +825,7 @@ AUPluginUI::cocoa_view_resized ()
|
||||||
wp->set_state_mask (WindowProxy::Position);
|
wp->set_state_mask (WindowProxy::Position);
|
||||||
}
|
}
|
||||||
|
|
||||||
NSRect new_frame = [au_view frame];
|
NSRect new_frame = [au_view frame];
|
||||||
|
|
||||||
/* from here on, we know that we've been called because the plugin
|
/* from here on, we know that we've been called because the plugin
|
||||||
* decided to change the NSView frame itself.
|
* decided to change the NSView frame itself.
|
||||||
|
|
@ -835,33 +835,33 @@ AUPluginUI::cocoa_view_resized ()
|
||||||
*/
|
*/
|
||||||
|
|
||||||
float dy = new_frame.size.height - last_au_frame.size.height;
|
float dy = new_frame.size.height - last_au_frame.size.height;
|
||||||
float dx = new_frame.size.width - last_au_frame.size.width;
|
float dx = new_frame.size.width - last_au_frame.size.width;
|
||||||
|
|
||||||
NSWindow* window = get_nswindow ();
|
NSWindow* window = get_nswindow ();
|
||||||
NSRect windowFrame= [window frame];
|
NSRect windowFrame= [window frame];
|
||||||
|
|
||||||
/* we want the top edge of the window to remain in the same place,
|
/* we want the top edge of the window to remain in the same place,
|
||||||
but the Cocoa/Quartz origin is at the lower left. So, when we make
|
* but the Cocoa/Quartz origin is at the lower left. So, when we make
|
||||||
the window larger, we will move it down, which means shifting the
|
* the window larger, we will move it down, which means shifting the
|
||||||
origin toward (x,0). This will leave the top edge in the same place.
|
* origin toward (x,0). This will leave the top edge in the same place.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
windowFrame.origin.y -= dy;
|
windowFrame.origin.y -= dy;
|
||||||
windowFrame.origin.x -= dx;
|
windowFrame.origin.x -= dx;
|
||||||
windowFrame.size.height += dy;
|
windowFrame.size.height += dy;
|
||||||
windowFrame.size.width += dx;
|
windowFrame.size.width += dx;
|
||||||
|
|
||||||
NSUInteger old_auto_resize = [au_view autoresizingMask];
|
NSUInteger old_auto_resize = [au_view autoresizingMask];
|
||||||
|
|
||||||
/* Some stupid AU Views change the origin of the original AU View when
|
/* Some stupid AU Views change the origin of the original AU View when
|
||||||
they are resized (I'm looking at you AUSampler). If the origin has
|
* they are resized (I'm looking at you AUSampler). If the origin has
|
||||||
been moved, move it back.
|
* been moved, move it back.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (last_au_frame.origin.x != new_frame.origin.x ||
|
if (last_au_frame.origin.x != new_frame.origin.x ||
|
||||||
last_au_frame.origin.y != new_frame.origin.y) {
|
last_au_frame.origin.y != new_frame.origin.y) {
|
||||||
new_frame.origin = last_au_frame.origin;
|
new_frame.origin = last_au_frame.origin;
|
||||||
[au_view setFrame:new_frame];
|
[au_view setFrame:new_frame];
|
||||||
|
|
||||||
NSArray* subviews = [au_view subviews];
|
NSArray* subviews = [au_view subviews];
|
||||||
for (unsigned long i = 0; i < [subviews count]; ++i) {
|
for (unsigned long i = 0; i < [subviews count]; ++i) {
|
||||||
|
|
@ -869,10 +869,10 @@ AUPluginUI::cocoa_view_resized ()
|
||||||
[subview setFrame:NSMakeRect (0, 0, new_frame.size.width, new_frame.size.height)];
|
[subview setFrame:NSMakeRect (0, 0, new_frame.size.width, new_frame.size.height)];
|
||||||
}
|
}
|
||||||
|
|
||||||
/* also be sure to redraw the topbox because this can
|
/* also be sure to redraw the topbox because this can
|
||||||
also go wrong.
|
also go wrong.
|
||||||
*/
|
*/
|
||||||
top_box.queue_draw ();
|
top_box.queue_draw ();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* We resize the window using Cocoa. We can't use GTK mechanisms
|
/* We resize the window using Cocoa. We can't use GTK mechanisms
|
||||||
|
|
@ -889,9 +889,9 @@ AUPluginUI::cocoa_view_resized ()
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
[au_view setAutoresizingMask:NSViewNotSizable];
|
[au_view setAutoresizingMask:NSViewNotSizable];
|
||||||
[window setFrame:windowFrame display:1];
|
[window setFrame:windowFrame display:1];
|
||||||
[au_view setAutoresizingMask:old_auto_resize];
|
[au_view setAutoresizingMask:old_auto_resize];
|
||||||
|
|
||||||
/* keep a copy of the size of the AU NSView. We didn't set it - the plugin did */
|
/* keep a copy of the size of the AU NSView. We didn't set it - the plugin did */
|
||||||
last_au_frame = new_frame;
|
last_au_frame = new_frame;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue