Improving StandaloneFilterWindow

I’ve built some audio plug-ins with JUCE already (1.5x) and I found it useful to add some arguments to the StandaloneFilterWindow::showAudioSettingsDialog in order to control the initial size, background colour and resizability of the created window.

What do you think about adding “backgroundColour”, “width”, “height” and “resizable” arguments to the method (with default values equals to the current hardcoded ones for compatibility) and pass them through the code inside?

That’s be a great improvement that’ll save the subclassing just to tweak those minor aspects

Well, StandaloneFilterWindow was only ever really intended as a demo class for people to copy, or something to use as a testing tool… I’m not really too keen to spend time pimping it up.

Well, ok, here is my drop-in replacement anyway, just in case…

virtual void showAudioSettingsDialog(const Colour& backgroundColour=Colours::lightgrey, const int width=500, const int height=450, const bool resizable=false)

and, in the body:

        o.content->setSize (width, height);

        o.dialogTitle                   = TRANS("Audio Settings");
        o.dialogBackgroundColour        = backgroundColour;
        o.escapeKeyTriggersCloseButton  = true;
        o.useNativeTitleBar             = true;
        o.resizable                     = resizable;