Merge pull request #3229 from Cacodemon345/patch-133

qt: Fix mute icon in CD-ROM menus
This commit is contained in:
Miran Grča
2023-04-04 20:04:58 +02:00
committed by GitHub

View File

@@ -572,7 +572,8 @@ MediaMenu::cdromUpdateMenu(int i)
auto childs = menu->children();
auto *muteMenu = dynamic_cast<QAction *>(childs[cdromMutePos]);
muteMenu->setChecked(cdrom[i].sound_on == 0);
muteMenu->setIcon(QApplication::style()->standardIcon((cdrom[i].sound_on == 0) ? QStyle::SP_MediaVolume : QStyle::SP_MediaVolumeMuted));
muteMenu->setText((cdrom[i].sound_on == 0) ? tr("&Unmute") : tr("&Mute"));
auto *imageMenu = dynamic_cast<QAction *>(childs[cdromImagePos]);
imageMenu->setEnabled(!name.isEmpty());