Qt: Make general settings overridable per-game
This commit is contained in:
parent
75b4891f78
commit
667726bbb3
|
@ -38,6 +38,11 @@ GeneralSettingsWidget::GeneralSettingsWidget(SettingsDialog* dialog, QWidget* pa
|
|||
|
||||
onRenderToSeparateWindowChanged();
|
||||
|
||||
if (m_dialog->isPerGameSettings())
|
||||
{
|
||||
m_ui.applyGameSettings->setEnabled(false);
|
||||
}
|
||||
|
||||
dialog->registerWidgetHelp(
|
||||
m_ui.confirmPowerOff, tr("Confirm Power Off"), tr("Checked"),
|
||||
tr("Determines whether a prompt will be displayed to confirm shutting down the emulator/game "
|
||||
|
|
|
@ -61,12 +61,13 @@ SettingsDialog::~SettingsDialog()
|
|||
|
||||
void SettingsDialog::addPages()
|
||||
{
|
||||
addWidget(m_general_settings = new GeneralSettingsWidget(this, m_ui.settingsContainer), tr("General"),
|
||||
QStringLiteral("settings-3-line"),
|
||||
tr("<strong>General Settings</strong><hr>These options control how the emulator looks and "
|
||||
"behaves.<br><br>Mouse over an option for additional information."));
|
||||
|
||||
if (!isPerGameSettings())
|
||||
{
|
||||
addWidget(m_general_settings = new GeneralSettingsWidget(this, m_ui.settingsContainer), tr("General"),
|
||||
QStringLiteral("settings-3-line"),
|
||||
tr("<strong>General Settings</strong><hr>These options control how the emulator looks and "
|
||||
"behaves.<br><br>Mouse over an option for additional information."));
|
||||
addWidget(
|
||||
m_game_list_settings = new GameListSettingsWidget(this, m_ui.settingsContainer), tr("Game List"),
|
||||
QStringLiteral("folder-settings-line"),
|
||||
|
@ -74,10 +75,6 @@ void SettingsDialog::addPages()
|
|||
"DuckStation to populate the game list. Search directories can be added, removed, and switched to "
|
||||
"recursive/non-recursive."));
|
||||
}
|
||||
else
|
||||
{
|
||||
m_ui.buttonBox->button(QDialogButtonBox::RestoreDefaults)->setVisible(false);
|
||||
}
|
||||
|
||||
addWidget(m_bios_settings = new BIOSSettingsWidget(this, m_ui.settingsContainer), tr("BIOS"),
|
||||
QStringLiteral("hard-drive-2-line"),
|
||||
|
@ -162,6 +159,11 @@ void SettingsDialog::addPages()
|
|||
tr("<strong>Advanced Settings</strong><hr>These options control logging and internal behavior of the "
|
||||
"emulator. Mouse over an option for additional information."));
|
||||
|
||||
if (isPerGameSettings())
|
||||
{
|
||||
m_ui.buttonBox->button(QDialogButtonBox::RestoreDefaults)->setVisible(false);
|
||||
}
|
||||
|
||||
m_ui.settingsCategory->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
|
||||
m_ui.settingsCategory->setCurrentRow(0);
|
||||
m_ui.settingsContainer->setCurrentIndex(0);
|
||||
|
|
Loading…
Reference in New Issue