Enable all buttons on native title bar

pull/170/head
James Ball 2023-12-22 14:41:52 +00:00
rodzic 3c1c73054e
commit eddfa9bcd9
2 zmienionych plików z 6 dodań i 7 usunięć

Wyświetl plik

@ -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<juce::DocumentWindow*>(w);
if (dw != nullptr) {
dw->setColour(juce::ResizableWindow::backgroundColourId, Colours::veryDark);
dw->setTitleBarButtonsRequired(juce::DocumentWindow::allButtons, false);
dw->setUsingNativeTitleBar(true);
}
}
}

Wyświetl plik

@ -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;
}