Browse Source

Standalone: Respect AudioProcessorEditor resize limits

tags/2021-05-28
ed 4 years ago
parent
commit
db618477ff
1 changed files with 16 additions and 4 deletions
  1. +16
    -4
      modules/juce_audio_plugin_client/Standalone/juce_StandaloneFilterWindow.h

+ 16
- 4
modules/juce_audio_plugin_client/Standalone/juce_StandaloneFilterWindow.h View File

@@ -819,10 +819,22 @@ private:
#else
if (editor != nullptr)
{
auto rect = getSizeToContainEditor();
setSize (rect.getWidth(),
rect.getHeight() + (shouldShowNotification ? NotificationArea::height : 0));
const int extraHeight = shouldShowNotification ? NotificationArea::height : 0;
const auto rect = getSizeToContainEditor();
if (auto* editorConstrainer = editor->getConstrainer())
{
const auto borders = owner.getContentComponentBorder();
const auto extraWindowWidth = borders.getLeftAndRight();
const auto extraWindowHeight = extraHeight + borders.getTopAndBottom();
owner.setResizeLimits (editorConstrainer->getMinimumWidth() + extraWindowWidth,
editorConstrainer->getMinimumHeight() + extraWindowHeight,
editorConstrainer->getMaximumWidth() + extraWindowWidth,
editorConstrainer->getMaximumHeight() + extraWindowHeight);
}
setSize (rect.getWidth(), rect.getHeight() + extraHeight);
}
#endif
}


Loading…
Cancel
Save