UI: Add missing option to context menu

Add 'Advanced Audio Properties' option to context menu over empty area
of the Mixer's pane.
master
SuslikV 2017-09-14 15:01:15 +02:00 committed by GitHub
parent 76b6266689
commit 2b175d6da9
1 changed files with 13 additions and 0 deletions

View File

@ -2327,12 +2327,25 @@ void OBSBasic::VolControlContextMenu()
void OBSBasic::on_mixerScrollArea_customContextMenuRequested() void OBSBasic::on_mixerScrollArea_customContextMenuRequested()
{ {
QAction unhideAllAction(QTStr("UnhideAll"), this); QAction unhideAllAction(QTStr("UnhideAll"), this);
QAction advPropAction(QTStr("Basic.MainMenu.Edit.AdvAudio"), this);
/* ------------------- */
connect(&unhideAllAction, &QAction::triggered, connect(&unhideAllAction, &QAction::triggered,
this, &OBSBasic::UnhideAllAudioControls, this, &OBSBasic::UnhideAllAudioControls,
Qt::DirectConnection); Qt::DirectConnection);
connect(&advPropAction, &QAction::triggered,
this, &OBSBasic::on_actionAdvAudioProperties_triggered,
Qt::DirectConnection);
/* ------------------- */
QMenu popup(this); QMenu popup(this);
popup.addAction(&unhideAllAction); popup.addAction(&unhideAllAction);
popup.addSeparator();
popup.addAction(&advPropAction);
popup.exec(QCursor::pos()); popup.exec(QCursor::pos());
} }