| 12 | namespace e47 { |
| 13 | |
| 14 | MenuBarWindow::MenuBarWindow(App* app) |
| 15 | : DocumentWindow(ProjectInfo::projectName, Colours::lightgrey, DocumentWindow::closeButton), m_app(app) { |
| 16 | PopupMenu m; |
| 17 | m.addItem("About AudioGridder", [app] { |
| 18 | app->showSplashWindow([app](bool isInfo) { |
| 19 | if (isInfo) { |
| 20 | URL("https://audiogridder.com").launchInDefaultBrowser(); |
| 21 | } |
| 22 | app->hideSplashWindow(); |
| 23 | }); |
| 24 | #ifdef JUCE_WINDOWS |
| 25 | String info = L"\xa9 2020-2023 Andreas Pohl, https://audiogridder.com"; |
| 26 | #else |
| 27 | String info = L"© 2020-2023 Andreas Pohl, https://audiogridder.com"; |
| 28 | #endif |
| 29 | app->setSplashInfo(info); |
| 30 | }); |
| 31 | const char* logoNoMac = Images::logowintray_png; |
| 32 | int logoNoMacSize = Images::logowintray_pngSize; |
| 33 | #ifdef JUCE_WINDOWS |
| 34 | bool lightTheme = |
| 35 | WindowsRegistry::getValue( |
| 36 | "HKEY_CURRENT_" |
| 37 | "USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Themes\\Personalize\\SystemUsesLightTheme", |
| 38 | "1") == "1"; |
| 39 | if (lightTheme) { |
| 40 | logoNoMac = Images::logowintraylight_png; |
| 41 | logoNoMacSize = Images::logowintraylight_pngSize; |
| 42 | } |
| 43 | #endif |
| 44 | setIconImage(ImageCache::getFromMemory(logoNoMac, logoNoMacSize), |
| 45 | ImageCache::getFromMemory(Images::logo_png, Images::logo_pngSize)); |
| 46 | #ifdef JUCE_MAC |
| 47 | app->setMacMainMenu(app, &m); |
| 48 | #endif |
| 49 | } |
| 50 | |
| 51 | MenuBarWindow::~MenuBarWindow() { |
| 52 | #ifdef JUCE_MAC |
nothing calls this directly
no test coverage detected