diff --git a/Source/PluginEditor.cpp b/Source/PluginEditor.cpp index a123fa2..fcc497e 100644 --- a/Source/PluginEditor.cpp +++ b/Source/PluginEditor.cpp @@ -56,7 +56,12 @@ OscirenderAudioProcessorEditor::OscirenderAudioProcessorEditor(OscirenderAudioPr if (audioProcessor.wrapperType == juce::AudioProcessor::WrapperType::wrapperType_Standalone) { if (juce::TopLevelWindow::getNumTopLevelWindows() == 1) { juce::TopLevelWindow* w = juce::TopLevelWindow::getTopLevelWindow(0); - w->setColour(juce::ResizableWindow::backgroundColourId, Colours::veryDark); + juce::DocumentWindow* dw = dynamic_cast(w); + if (dw != nullptr) { + dw->setColour(juce::ResizableWindow::backgroundColourId, Colours::veryDark); + dw->setTitleBarButtonsRequired(juce::DocumentWindow::allButtons, false); + dw->setUsingNativeTitleBar(true); + } } } diff --git a/Source/PluginProcessor.cpp b/Source/PluginProcessor.cpp index 0b15509..350f343 100644 --- a/Source/PluginProcessor.cpp +++ b/Source/PluginProcessor.cpp @@ -645,12 +645,6 @@ bool OscirenderAudioProcessor::hasEditor() const { juce::AudioProcessorEditor* OscirenderAudioProcessor::createEditor() { auto editor = new OscirenderAudioProcessorEditor(*this); - if (wrapperType == wrapperType_Standalone) { - if (juce::TopLevelWindow::getNumTopLevelWindows() == 1) { - juce::TopLevelWindow* w = juce::TopLevelWindow::getTopLevelWindow(0); - w->setUsingNativeTitleBar(true); - } - } return editor; }