mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-04-05 07:14:53 -04:00
UI: Add audio mixer toolbar
This adds a toolbar to the audio mixer dock, so it is easier to access advanced audio dialog and unhide/vertical actions.
This commit is contained in:
@@ -581,6 +581,14 @@ void OBSBasic::copyActionsDynamicProperties()
|
||||
temp->setProperty(y, x->property(y));
|
||||
}
|
||||
}
|
||||
|
||||
for (QAction *x : ui->mixerToolbar->actions()) {
|
||||
QWidget *temp = ui->mixerToolbar->widgetForAction(x);
|
||||
|
||||
for (QByteArray &y : x->dynamicPropertyNames()) {
|
||||
temp->setProperty(y, x->property(y));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void OBSBasic::UpdateVolumeControlsDecayRate()
|
||||
@@ -4960,6 +4968,31 @@ void OBSBasic::on_actionAdvAudioProperties_triggered()
|
||||
advAudioWindow->SetIconsVisible(iconsVisible);
|
||||
}
|
||||
|
||||
void OBSBasic::on_actionMixerToolbarAdvAudio_triggered()
|
||||
{
|
||||
on_actionAdvAudioProperties_triggered();
|
||||
}
|
||||
|
||||
void OBSBasic::on_actionMixerToolbarMenu_triggered()
|
||||
{
|
||||
QAction unhideAllAction(QTStr("UnhideAll"), this);
|
||||
connect(&unhideAllAction, &QAction::triggered, this,
|
||||
&OBSBasic::UnhideAllAudioControls, Qt::DirectConnection);
|
||||
|
||||
QAction toggleControlLayoutAction(QTStr("VerticalLayout"), this);
|
||||
toggleControlLayoutAction.setCheckable(true);
|
||||
toggleControlLayoutAction.setChecked(config_get_bool(
|
||||
GetGlobalConfig(), "BasicWindow", "VerticalVolControl"));
|
||||
connect(&toggleControlLayoutAction, &QAction::changed, this,
|
||||
&OBSBasic::ToggleVolControlLayout, Qt::DirectConnection);
|
||||
|
||||
QMenu popup;
|
||||
popup.addAction(&unhideAllAction);
|
||||
popup.addSeparator();
|
||||
popup.addAction(&toggleControlLayoutAction);
|
||||
popup.exec(QCursor::pos());
|
||||
}
|
||||
|
||||
void OBSBasic::on_scenes_currentItemChanged(QListWidgetItem *current,
|
||||
QListWidgetItem *prev)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user