1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

StandaloneFilterWindow: Auto-resize settings dialog when IO options change

This commit is contained in:
reuk 2021-04-11 16:58:39 +01:00
parent 04fdc4c209
commit 6832dca430

View file

@ -466,6 +466,24 @@ private:
deviceSelector.setBounds (r);
}
void childBoundsChanged (Component* childComp) override
{
if (childComp != &deviceSelector)
return;
const auto extraHeight = [&]
{
if (! owner.getProcessorHasPotentialFeedbackLoop())
return 0;
const auto itemHeight = deviceSelector.getItemHeight();
const auto separatorHeight = (itemHeight >> 1);
return itemHeight + separatorHeight;
}();
setSize (getWidth(), deviceSelector.getHeight() + extraHeight);
}
private:
//==============================================================================
StandalonePluginHolder& owner;