Browse Source

Standalone plug-in: Fixed an issue where resizing a plugin's editor in standalone mode would not resize the parent window

tags/2021-05-28
hogliux tpoole 8 years ago
parent
commit
9d52538e91
1 changed files with 20 additions and 2 deletions
  1. +20
    -2
      modules/juce_audio_plugin_client/Standalone/juce_StandaloneFilterWindow.h

+ 20
- 2
modules/juce_audio_plugin_client/Standalone/juce_StandaloneFilterWindow.h View File

@@ -673,7 +673,9 @@ public:
private:
//==============================================================================
class MainContentComponent : public Component, private Value::Listener, Button::Listener
class MainContentComponent : public Component, private Value::Listener,
Button::Listener,
ComponentListener
{
public:
MainContentComponent (StandaloneFilterWindow& filterWindow)
@@ -683,7 +685,14 @@ private:
{
Value& inputMutedValue = owner.pluginHolder->getMuteInputValue();
addAndMakeVisible (editor);
if (editor != nullptr)
{
editor->addComponentListener (this);
componentMovedOrResized (*editor, false, true);
addAndMakeVisible (editor);
}
addChildComponent (notification);
if (owner.pluginHolder->getProcessorHasPotentialFeedbackLoop())
@@ -699,6 +708,7 @@ private:
{
if (editor != nullptr)
{
editor->removeComponentListener (this);
owner.pluginHolder->processor->editorBeingDeleted (editor);
editor = nullptr;
}
@@ -783,6 +793,14 @@ private:
#endif
}
//==============================================================================
void componentMovedOrResized (Component&, bool, bool wasResized) override
{
if (wasResized && editor != nullptr)
setSize (editor->getWidth(),
editor->getHeight() + (shouldShowNotification ? NotificationArea::height : 0));
}
//==============================================================================
StandaloneFilterWindow& owner;
NotificationArea notification;


Loading…
Cancel
Save