Let the customized file browser component own the look and feel
This commit is contained in:
@ -247,8 +247,6 @@ PaulstretchpluginAudioProcessorEditor::PaulstretchpluginAudioProcessorEditor(Pau
|
||||
|
||||
PaulstretchpluginAudioProcessorEditor::~PaulstretchpluginAudioProcessorEditor()
|
||||
{
|
||||
if (m_filechooser)
|
||||
m_filechooser->setLookAndFeel(nullptr);
|
||||
//Logger::writeToLog("PaulX Editor destroyed");
|
||||
}
|
||||
|
||||
@ -583,7 +581,6 @@ void PaulstretchpluginAudioProcessorEditor::toggleFileBrowser()
|
||||
if (m_filechooser == nullptr)
|
||||
{
|
||||
m_filechooser = std::make_unique<MyFileBrowserComponent>(processor);
|
||||
m_filechooser->setLookAndFeel(&m_filebwlookandfeel);
|
||||
addChildComponent(m_filechooser.get());
|
||||
}
|
||||
m_filechooser->setBounds(0, 26, getWidth()/2, getHeight() - 75);
|
||||
@ -1592,6 +1589,12 @@ MyFileBrowserComponent::MyFileBrowserComponent(PaulstretchpluginAudioProcessor &
|
||||
initialloc, &m_filefilter, nullptr);
|
||||
m_fbcomp->addListener(this);
|
||||
addAndMakeVisible(m_fbcomp.get());
|
||||
setLookAndFeel(&m_filebwlookandfeel);
|
||||
}
|
||||
|
||||
MyFileBrowserComponent::~MyFileBrowserComponent()
|
||||
{
|
||||
setLookAndFeel(nullptr);
|
||||
}
|
||||
|
||||
void MyFileBrowserComponent::resized()
|
||||
|
Reference in New Issue
Block a user