qt: The sound icon's menu is now a submenu of the Tools menu

Replaces (and includes) the standalone Sound gain option
This commit is contained in:
Alexander Babikov
2025-04-11 05:26:01 +05:00
parent 1819539c97
commit 40ee98d6f3
29 changed files with 110 additions and 33 deletions

View File

@@ -180,7 +180,8 @@ MainWindow::MainWindow(QWidget *parent)
extern MainWindow *main_window;
main_window = this;
ui->setupUi(this);
status->setSoundGainAction(ui->actionSound_gain);
status->setSoundMenu(ui->menuSound);
ui->actionMute_Unmute->setText(sound_muted ? tr("&Unmute") : tr("&Mute"));
ui->menuEGA_S_VGA_settings->menuAction()->setMenuRole(QAction::NoRole);
ui->stackedWidget->setMouseTracking(true);
statusBar()->setVisible(!hide_status_bar);
@@ -1334,7 +1335,7 @@ void
MainWindow::refreshMediaMenu()
{
mm->refresh(ui->menuMedia);
status->setSoundGainAction(ui->actionSound_gain);
status->setSoundMenu(ui->menuSound);
status->refresh(ui->statusbar);
ui->actionMCA_devices->setVisible(machine_has_bus(machine, MACHINE_BUS_MCA));
ui->actionACPI_Shutdown->setEnabled(!!acpi_enabled);
@@ -1937,6 +1938,15 @@ MainWindow::on_actionTake_screenshot_triggered()
device_force_redraw();
}
void
MainWindow::on_actionMute_Unmute_triggered()
{
sound_muted ^= 1;
config_save();
status->updateSoundIcon();
ui->actionMute_Unmute->setText(sound_muted ? tr("&Unmute") : tr("&Mute"));
}
void
MainWindow::on_actionSound_gain_triggered()
{