1
Fork 0
mirror of https://github.com/redstrate/Astra.git synced 2025-04-24 05:17:46 +00:00

Finally, set the correct menu roles on macOS

"Configure Wine..." was accidentally picked up as the preferences, but
now the real settings window is in the preferences' role.
This commit is contained in:
Joshua Goins 2022-04-10 21:00:05 -04:00
parent 32ab6b7bba
commit b7ecfb3ebf

View file

@ -55,7 +55,7 @@ LauncherWindow::LauncherWindow(LauncherCore& core, QWidget* parent) : QMainWindo
QAction* settingsAction = fileMenu->addAction("Configure Astra..."); QAction* settingsAction = fileMenu->addAction("Configure Astra...");
settingsAction->setIcon(QIcon::fromTheme("configure")); settingsAction->setIcon(QIcon::fromTheme("configure"));
settingsAction->setMenuRole(QAction::MenuRole::NoRole); settingsAction->setMenuRole(QAction::MenuRole::PreferencesRole);
connect(settingsAction, &QAction::triggered, [=] { connect(settingsAction, &QAction::triggered, [=] {
auto window = new SettingsWindow(0, *this, this->core, this); auto window = new SettingsWindow(0, *this, this->core, this);
connect(&this->core, &LauncherCore::settingsChanged, window, &SettingsWindow::reloadControls); connect(&this->core, &LauncherCore::settingsChanged, window, &SettingsWindow::reloadControls);
@ -75,6 +75,7 @@ LauncherWindow::LauncherWindow(LauncherCore& core, QWidget* parent) : QMainWindo
fileMenu->addSeparator(); fileMenu->addSeparator();
wineCfg = fileMenu->addAction("Configure Wine..."); wineCfg = fileMenu->addAction("Configure Wine...");
wineCfg->setMenuRole(QAction::MenuRole::NoRole);
wineCfg->setIcon(QIcon::fromTheme("configure")); wineCfg->setIcon(QIcon::fromTheme("configure"));
connect(wineCfg, &QAction::triggered, [=] { connect(wineCfg, &QAction::triggered, [=] {
this->core.launchExternalTool(currentProfile(), {"winecfg.exe"}); this->core.launchExternalTool(currentProfile(), {"winecfg.exe"});