Make sure the exit action is the last action in the tray menu

This commit is contained in:
morg 2021-09-01 21:04:01 +02:00 committed by Adam Honse
parent 3699889250
commit 344e7c7551
2 changed files with 4 additions and 2 deletions

View file

@ -343,7 +343,7 @@ OpenRGBDialog2::OpenRGBDialog2(QWidget *parent) : QMainWindow(parent), ui(new Op
connect(actionLightsOff, SIGNAL(triggered()), this, SLOT(on_LightsOff()));
trayIconMenu->addAction(actionLightsOff);
QAction* actionExit = new QAction( "Exit", this );
actionExit = new QAction( "Exit", this );
connect( actionExit, SIGNAL( triggered() ), this, SLOT( on_Exit() ));
trayIconMenu->addAction(actionExit);
@ -807,7 +807,7 @@ void OpenRGBDialog2::AddPlugin(OpenRGBPluginEntry* plugin)
if(NewTrayMenu)
{
trayIconMenu->addMenu(NewTrayMenu);
trayIconMenu->insertMenu(actionExit, NewTrayMenu);
}
}

View file

@ -104,6 +104,8 @@ private:
PluginManager* plugin_manager = nullptr;
QAction* actionExit;
private slots:
void on_Exit();
void on_LightsOff();