Browse Source

Proper fix for plugin ui subview size on macOS

tags/v1.9.11
falkTX 6 years ago
parent
commit
eeeb9e9f0f
1 changed files with 11 additions and 3 deletions
  1. +11
    -3
      source/utils/CarlaPluginUI.cpp

+ 11
- 3
source/utils/CarlaPluginUI.cpp View File

@@ -478,7 +478,7 @@ public:
style |= NSResizableWindowMask;
*/

NSRect frame = NSMakeRect(0, 0, 800, 600);
NSRect frame = NSMakeRect(0, 0, 100, 100);

fWindow = [[[CarlaPluginWindow alloc]
initWithContentRect:frame
@@ -495,8 +495,10 @@ public:
}

//if (! isResizable)
[fView setAutoresizingMask:NSViewNotSizable];
[[fWindow standardWindowButton:NSWindowZoomButton] setHidden:YES];
{
[fView setAutoresizingMask:NSViewNotSizable];
[[fWindow standardWindowButton:NSWindowZoomButton] setHidden:YES];
}

[fWindow setCallback:cb];
[fWindow setContentView:fView];
@@ -570,6 +572,12 @@ public:

[fView setFrame:NSMakeRect(0, 0, width, height)];

for (NSView* subview in [fView subviews])
{
[subview setFrame:NSMakeRect(0, 0, width, height)];
break;
}

const NSSize size = NSMakeSize(width, height);
[fWindow setContentSize:size];



Loading…
Cancel
Save