diff options
| author | Isaac Marovitz <42140194+IsaacMarovitz@users.noreply.github.com> | 2022-12-01 21:31:21 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-12-02 03:31:21 +0100 |
| commit | b540ea80d16488d1e5b3eb6ca6b9e93cc663b06f (patch) | |
| tree | 7dad972c3e1560da8aecb80c5f69df56dde74852 /Ryujinx.Ava/Ui/Windows | |
| parent | d692a9b83ebb1c0303f91adaa22cd67852f2386f (diff) | |
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
Diffstat (limited to 'Ryujinx.Ava/Ui/Windows')
| -rw-r--r-- | Ryujinx.Ava/Ui/Windows/SettingsWindow.axaml | 23 | ||||
| -rw-r--r-- | Ryujinx.Ava/Ui/Windows/SettingsWindow.axaml.cs | 30 |
2 files changed, 16 insertions, 37 deletions
diff --git a/Ryujinx.Ava/Ui/Windows/SettingsWindow.axaml b/Ryujinx.Ava/Ui/Windows/SettingsWindow.axaml index 1791d8ea..0a5cdc89 100644 --- a/Ryujinx.Ava/Ui/Windows/SettingsWindow.axaml +++ b/Ryujinx.Ava/Ui/Windows/SettingsWindow.axaml @@ -955,16 +955,25 @@ Icon="Document" /> </ui:NavigationView.MenuItems> </ui:NavigationView> - <StackPanel + <ReversibleStackPanel Grid.Row="2" Margin="10" Spacing="10" Orientation="Horizontal" - HorizontalAlignment="Right"> - <Button Content="{locale:Locale SettingsButtonSave}" Click="SaveButton_Clicked" /> - <Button Content="{locale:Locale SettingsButtonClose}" Click="CloseButton_Clicked" /> - <Button Content="{locale:Locale SettingsButtonApply}" - Click="ApplyButton_Clicked" /> - </StackPanel> + HorizontalAlignment="Right" + ReverseOrder="{ReflectionBinding IsMacOS}"> + <Button + HotKey="Enter" + Classes="accent" + Content="{locale:Locale SettingsButtonOk}" + Command="{ReflectionBinding OkButton}" /> + <Button + HotKey="Escape" + Content="{locale:Locale SettingsButtonCancel}" + Command="{ReflectionBinding CancelButton}" /> + <Button + Content="{locale:Locale SettingsButtonApply}" + Command="{ReflectionBinding ApplyButton}" /> + </ReversibleStackPanel> </Grid> </window:StyleableWindow>
\ No newline at end of file diff --git a/Ryujinx.Ava/Ui/Windows/SettingsWindow.axaml.cs b/Ryujinx.Ava/Ui/Windows/SettingsWindow.axaml.cs index 0e610d77..d690322d 100644 --- a/Ryujinx.Ava/Ui/Windows/SettingsWindow.axaml.cs +++ b/Ryujinx.Ava/Ui/Windows/SettingsWindow.axaml.cs @@ -199,36 +199,6 @@ namespace Ryujinx.Ava.Ui.Windows } } - private void SaveButton_Clicked(object sender, RoutedEventArgs e) - { - SaveSettings(); - Close(); - } - - private void CloseButton_Clicked(object sender, RoutedEventArgs e) - { - ViewModel.RevertIfNotSaved(); - Close(); - } - - private void ApplyButton_Clicked(object sender, RoutedEventArgs e) - { - SaveSettings(); - } - - private void SaveSettings() - { - ViewModel.SaveSettings(); - ControllerSettings?.SaveCurrentProfile(); - - if (Owner is MainWindow window && ViewModel.DirectoryChanged) - { - window.ViewModel.LoadApplications(); - } - - ViewModel.DirectoryChanged = false; - } - protected override void OnClosed(EventArgs e) { ControllerSettings.Dispose(); |
