fix: Mac os missing Quit from tray menu

This commit is contained in:
sithlord48
2024-12-22 16:42:36 -05:00
committed by Nick Bolton
parent 368ccbbe4c
commit 8e9925d6c8

View File

@ -577,9 +577,14 @@ void MainWindow::open()
QList<QAction *> trayActions{m_actionStartCore, m_actionStopCore, nullptr, m_actionQuit};
#ifdef Q_OS_MAC
// Duplicate quit needed for mac os tray menu
QAction *actionTrayQuit = new QAction(tr("Quit Deskflow"), this);
actionTrayQuit->setShortcut(QKeySequence::Quit);
m_actionRestore->setText(tr("Open Deskflow"));
trayActions.insert(3, m_actionRestore);
trayActions.insert(4, nullptr);
trayActions.append(nullptr);
trayActions.append(actionTrayQuit);
#endif
m_TrayIcon.create(trayActions);