From 7831ba293a7e348fd2fb0563ae01cc0de5cab8f9 Mon Sep 17 00:00:00 2001 From: sithlord48 Date: Sat, 29 Nov 2025 10:03:14 -0500 Subject: [PATCH] fix: Mac os Preferences missing when translated fixes: #9226 In the MainWindow give all menu items a role to prevent mac os from misplacing them due to their label when translated --- src/lib/gui/MainWindow.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/lib/gui/MainWindow.cpp b/src/lib/gui/MainWindow.cpp index 78b3a6c69..59f9d4411 100644 --- a/src/lib/gui/MainWindow.cpp +++ b/src/lib/gui/MainWindow.cpp @@ -106,23 +106,30 @@ MainWindow::MainWindow() m_actionTrayQuit->setShortcut(QKeySequence::Quit); } - m_actionQuit->setMenuRole(QAction::QuitRole); m_actionQuit->setIcon(QIcon(QIcon::fromTheme("application-exit"))); + m_actionQuit->setMenuRole(QAction::QuitRole); + m_actionTrayQuit->setIcon(QIcon(QIcon::fromTheme("application-exit"))); + m_actionTrayQuit->setMenuRole(QAction::NoRole); m_actionClearSettings->setIcon(QIcon::fromTheme(QStringLiteral("edit-clear-all"))); + m_actionClearSettings->setMenuRole(QAction::NoRole); - m_actionSettings->setMenuRole(QAction::PreferencesRole); m_actionSettings->setIcon(QIcon::fromTheme(QStringLiteral("configure"))); + m_actionSettings->setMenuRole(QAction::PreferencesRole); m_actionStartCore->setIcon(QIcon::fromTheme(QStringLiteral("system-run"))); + m_actionStartCore->setMenuRole(QAction::NoRole); m_actionRestartCore->setVisible(false); m_actionRestartCore->setIcon(QIcon::fromTheme(QStringLiteral("view-refresh"))); + m_actionRestartCore->setMenuRole(QAction::NoRole); m_actionStopCore->setIcon(QIcon::fromTheme(QIcon::ThemeIcon::ProcessStop)); + m_actionStopCore->setMenuRole(QAction::NoRole); m_actionReportBug->setIcon(QIcon(QIcon::fromTheme(QStringLiteral("tools-report-bug")))); + m_actionReportBug->setMenuRole(QAction::NoRole); // Setup the Instance Checking // In case of a previous crash remove first