From b540ea80d16488d1e5b3eb6ca6b9e93cc663b06f Mon Sep 17 00:00:00 2001 From: Isaac Marovitz <42140194+IsaacMarovitz@users.noreply.github.com> Date: Thu, 1 Dec 2022 21:31:21 -0500 Subject: Ava GUI: Make Dialogue More Intuitive (#3955) * Adjust button position and locales * Shortcuts + Highlight default action * Update Locales - Corrections Welcome * Move `Apply` button back to right side * OS Reactive Button layout * Fix reversed boolean :) * Fix accented button styling --- Ryujinx.Ava/Ui/ViewModels/SettingsViewModel.cs | 36 +++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) (limited to 'Ryujinx.Ava/Ui/ViewModels/SettingsViewModel.cs') diff --git a/Ryujinx.Ava/Ui/ViewModels/SettingsViewModel.cs b/Ryujinx.Ava/Ui/ViewModels/SettingsViewModel.cs index 58462741..bd4a55e8 100644 --- a/Ryujinx.Ava/Ui/ViewModels/SettingsViewModel.cs +++ b/Ryujinx.Ava/Ui/ViewModels/SettingsViewModel.cs @@ -118,7 +118,12 @@ namespace Ryujinx.Ava.Ui.ViewModels OnPropertyChanged(); } } - + + public bool IsMacOS + { + get => OperatingSystem.IsMacOS(); + } + public bool EnableDiscordIntegration { get; set; } public bool CheckUpdatesOnStart { get; set; } public bool ShowConfirmExit { get; set; } @@ -474,11 +479,40 @@ namespace Ryujinx.Ava.Ui.ViewModels MainWindow.UpdateGraphicsConfig(); _previousVolumeLevel = Volume; + + if (_owner is SettingsWindow owner) + { + owner.ControllerSettings?.SaveCurrentProfile(); + } + + if (_owner.Owner is MainWindow window && _directoryChanged) + { + window.ViewModel.LoadApplications(); + } + + _directoryChanged = false; } public void RevertIfNotSaved() { Program.ReloadConfig(); } + + public void ApplyButton() + { + SaveSettings(); + } + + public void OkButton() + { + SaveSettings(); + _owner.Close(); + } + + public void CancelButton() + { + RevertIfNotSaved(); + _owner.Close(); + } } } \ No newline at end of file -- cgit v1.2.3