Enable/Disable Apply if dirty

This commit is contained in:
Isaac Marovitz 2024-04-18 18:07:02 -04:00
parent 417b4caa98
commit 7821d4581a
No known key found for this signature in database
GPG key ID: 97250B2B09A132E1
2 changed files with 3 additions and 1 deletions

View file

@ -124,6 +124,7 @@
Content="{locale:Locale SettingsButtonCancel}" Content="{locale:Locale SettingsButtonCancel}"
Command="{Binding CancelButton}" /> Command="{Binding CancelButton}" />
<Button <Button
Name="Apply"
Content="{locale:Locale SettingsButtonApply}" Content="{locale:Locale SettingsButtonApply}"
Command="{Binding ApplyButton}" /> Command="{Binding ApplyButton}" />
</ReversibleStackPanel> </ReversibleStackPanel>

View file

@ -42,11 +42,12 @@ namespace Ryujinx.Ava.UI.Windows
if (isDirty) if (isDirty)
{ {
Title = $"{LocaleManager.Instance[LocaleKeys.Settings]} - {LocaleManager.Instance[LocaleKeys.SettingsDirty]}"; Title = $"{LocaleManager.Instance[LocaleKeys.Settings]} - {LocaleManager.Instance[LocaleKeys.SettingsDirty]}";
Apply.IsEnabled = true;
} }
else else
{ {
Title = $"{LocaleManager.Instance[LocaleKeys.Settings]}"; Title = $"{LocaleManager.Instance[LocaleKeys.Settings]}";
Apply.IsEnabled = false;
} }
} }