1
Fork 0
mirror of https://github.com/redstrate/Astra.git synced 2025-04-22 12:47:44 +00:00

Force menu role on macOS for settings menu items

For some reason this is broken on macOS, so let's force the menu role
for now.
This commit is contained in:
Joshua Goins 2022-04-10 18:23:34 -04:00
parent 8cdfe1dfde
commit 6699ebc076

View file

@ -54,6 +54,7 @@ LauncherWindow::LauncherWindow(LauncherCore& core, QWidget* parent) : QMainWindo
QAction* settingsAction = fileMenu->addAction("Configure Astra...");
settingsAction->setIcon(QIcon::fromTheme("configure"));
settingsAction->setMenuRole(QAction::MenuRole::NoRole);
connect(settingsAction, &QAction::triggered, [=] {
auto window = new SettingsWindow(0, *this, this->core, this);
connect(&this->core, &LauncherCore::settingsChanged, window, &SettingsWindow::reloadControls);
@ -62,6 +63,7 @@ LauncherWindow::LauncherWindow(LauncherCore& core, QWidget* parent) : QMainWindo
QAction* profilesAction = fileMenu->addAction("Configure Profiles...");
profilesAction->setIcon(QIcon::fromTheme("configure"));
profilesAction->setMenuRole(QAction::MenuRole::NoRole);
connect(profilesAction, &QAction::triggered, [=] {
auto window = new SettingsWindow(1, *this, this->core, this);
connect(&this->core, &LauncherCore::settingsChanged, window, &SettingsWindow::reloadControls);