From 6be642a118cc403c927c225493aba42432e92cda Mon Sep 17 00:00:00 2001 From: Thomas Date: Mon, 9 Dec 2024 19:54:29 +0100 Subject: [PATCH] Qt: put preferences and about in native spots on MacOS (#676) --- src/panda_qt/main_window.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/panda_qt/main_window.cpp b/src/panda_qt/main_window.cpp index c30d23ca2..784e1176e 100644 --- a/src/panda_qt/main_window.cpp +++ b/src/panda_qt/main_window.cpp @@ -55,6 +55,8 @@ MainWindow::MainWindow(QApplication* app, QWidget* parent) : QMainWindow(parent) auto resumeAction = emulationMenu->addAction(tr("Resume")); auto resetAction = emulationMenu->addAction(tr("Reset")); auto configureAction = emulationMenu->addAction(tr("Configure")); + configureAction->setMenuRole(QAction::PreferencesRole); + connect(pauseAction, &QAction::triggered, this, [this]() { sendMessage(EmulatorMessage{.type = MessageType::Pause}); }); connect(resumeAction, &QAction::triggered, this, [this]() { sendMessage(EmulatorMessage{.type = MessageType::Resume}); }); connect(resetAction, &QAction::triggered, this, [this]() { sendMessage(EmulatorMessage{.type = MessageType::Reset}); }); @@ -75,7 +77,9 @@ MainWindow::MainWindow(QApplication* app, QWidget* parent) : QMainWindow(parent) connect(dumpDspFirmware, &QAction::triggered, this, &MainWindow::dumpDspFirmware); auto aboutAction = aboutMenu->addAction(tr("About Panda3DS")); + aboutAction->setMenuRole(QAction::AboutRole); connect(aboutAction, &QAction::triggered, this, &MainWindow::showAboutMenu); + setMenuBar(menuBar); emu->setOutputSize(screen->surfaceWidth, screen->surfaceHeight);