mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-23 01:44:22 +00:00
AUv3: Fall back to view size if AUViewControllerBase preferredContentSize property has a zero size when opening plug-in editor
This commit is contained in:
parent
ada1b2d693
commit
d589f65b36
1 changed files with 10 additions and 2 deletions
|
|
@ -2411,8 +2411,16 @@ private:
|
|||
#if JUCE_SUPPORTS_AUv3
|
||||
void requestViewControllerCallback (AUViewControllerBase* controller)
|
||||
{
|
||||
auto nsSize = [controller preferredContentSize];
|
||||
auto viewSize = CGSizeMake (nsSize.width, nsSize.height);
|
||||
const auto viewSize = [&controller]
|
||||
{
|
||||
auto size = [controller preferredContentSize];
|
||||
|
||||
if (size.width == 0 || size.height == 0)
|
||||
size = controller.view.frame.size;
|
||||
|
||||
return CGSizeMake (jmax ((CGFloat) 20.0f, size.width),
|
||||
jmax ((CGFloat) 20.0f, size.height));
|
||||
}();
|
||||
|
||||
if (! MessageManager::getInstance()->isThisTheMessageThread())
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue