PluginListComponent lookandFeel

#1

I’m tearing my hair out here trying to set a PluginListComponent lookAndFeel. It appears Ok when first launched
image
…but the popup menu and scanning windows show a V2 lookAndFeel?

The code is posted below, it’s more or less lifted straight from the AudioPluginHost demo. Any ideas how I can get the LookAndFeel to propagate through all child components?

class MainComponent::PluginListWindow  : public DocumentWindow
{
public:
    PluginListWindow (MainComponent& mw, AudioPluginFormatManager& pluginFormatManager)
    : DocumentWindow ("Available Plugins",
                      LookAndFeel::getDefaultLookAndFeel().findColour (ResizableWindow::backgroundColourId),
                      DocumentWindow::minimiseButton | DocumentWindow::closeButton),
    owner (mw)
    {
        setLookAndFeel(&lookAndFeel);

		auto deadMansPedalFile = owner.getSettings()->getUserSettings()->getFile().getSiblingFile ("RecentlyCrashedPluginsList");
        
        setContentOwned (new PluginListComponent (pluginFormatManager,
                                                  owner.knownPluginList,
                                                  deadMansPedalFile,
                                                  owner.getSettings()->getUserSettings(), true), true);
		
        setResizable (true, false);
        setResizeLimits (300, 400, 1200, 500);
        setTopLeftPosition (60, 60);
        
        restoreWindowStateFromString (owner.getSettings()->getUserSettings()->getValue ("listWindowPos"));
        setVisible (true);
    }
    
    ~PluginListWindow()
    {
        setLookAndFeel(nullptr);
        owner.getSettings()->getUserSettings()->setValue ("listWindowPos", getWindowStateAsString());
        clearContentComponent();
    }
    
    void closeButtonPressed() override
    {
        owner.pluginListWindow = nullptr;
    }
    
private:
    MainComponent& owner;
    LookAndFeel_V4 lookAndFeel;
    
    JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (PluginListWindow)
};
};

Iterating through all child componnts and manually setting the look and feel doesn’t work either?

	    for (auto& c : this->getChildren())
		{
			c->setLookAndFeel(&lookAndFeel);
			c->lookAndFeelChanged();
		}
0 Likes