Skip to content

Commit

Permalink
Fix bug when opening separate windows in Reaper
Browse files Browse the repository at this point in the history
  • Loading branch information
jameshball committed Aug 26, 2024
1 parent 6194b03 commit 2f671f6
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
9 changes: 7 additions & 2 deletions Source/PluginEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,16 @@ OscirenderAudioProcessorEditor::OscirenderAudioProcessorEditor(OscirenderAudioPr
};

visualiserSettingsWindow.setResizable(false, false);
#if JUCE_WINDOWS
// if not standalone, use native title bar for compatibility with DAWs
visualiserSettingsWindow.setUsingNativeTitleBar(processor.wrapperType == juce::AudioProcessor::WrapperType::wrapperType_Standalone);
#elif JUCE_MAC
visualiserSettingsWindow.setUsingNativeTitleBar(true);
#endif
visualiserSettings.setLookAndFeel(&getLookAndFeel());
visualiserSettings.setSize(550, 260);
visualiserSettings.setSize(550, 280);
visualiserSettingsWindow.setContentNonOwned(&visualiserSettings, true);
visualiserSettingsWindow.centreWithSize(550, 260);
visualiserSettingsWindow.centreWithSize(550, 280);

tooltipDropShadow.setOwner(&tooltipWindow);
}
Expand Down
7 changes: 6 additions & 1 deletion Source/components/MainMenuBarModel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,16 @@ void MainMenuBarModel::menuItemSelected(int menuItemID, int topLevelMenuIndex) {
juce::DialogWindow::LaunchOptions options;
AboutComponent* about = new AboutComponent();
options.content.setOwned(about);
options.content->setSize(500, 250);
options.content->setSize(500, 270);
options.dialogTitle = "About";
options.dialogBackgroundColour = Colours::dark;
options.escapeKeyTriggersCloseButton = true;
#if JUCE_WINDOWS
// if not standalone, use native title bar for compatibility with DAWs
options.useNativeTitleBar = editor.processor.wrapperType == juce::AudioProcessor::WrapperType::wrapperType_Standalone;
#elif JUCE_MAC
options.useNativeTitleBar = true;
#endif
options.resizable = false;

juce::DialogWindow* dw = options.launchAsync();
Expand Down

0 comments on commit 2f671f6

Please sign in to comment.