From da590b0fe32059b4382d17c50820c335850ea789 Mon Sep 17 00:00:00 2001
From: Isaac Marovitz <42140194+IsaacMarovitz@users.noreply.github.com>
Date: Sun, 25 Dec 2022 19:23:15 +0000
Subject: [PATCH] Use `ReflectionBinding` instead of redundant funcs
---
Ryujinx.Ava/UI/Windows/SettingsWindow.axaml | 6 +++---
Ryujinx.Ava/UI/Windows/SettingsWindow.axaml.cs | 15 ---------------
2 files changed, 3 insertions(+), 18 deletions(-)
diff --git a/Ryujinx.Ava/UI/Windows/SettingsWindow.axaml b/Ryujinx.Ava/UI/Windows/SettingsWindow.axaml
index 29a2278b7..851e9b5b3 100644
--- a/Ryujinx.Ava/UI/Windows/SettingsWindow.axaml
+++ b/Ryujinx.Ava/UI/Windows/SettingsWindow.axaml
@@ -107,14 +107,14 @@
HotKey="Enter"
Classes="accent"
Content="{locale:Locale SettingsButtonOk}"
- Click="OkButton" />
+ Command="{ReflectionBinding OkButton}" />
+ Command="{ReflectionBinding CancelButton}" />
+ Command="{ReflectionBinding ApplyButton}" />
\ 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 07d5c19b3..aa6e48516 100644
--- a/Ryujinx.Ava/UI/Windows/SettingsWindow.axaml.cs
+++ b/Ryujinx.Ava/UI/Windows/SettingsWindow.axaml.cs
@@ -96,21 +96,6 @@ namespace Ryujinx.Ava.UI.Windows
}
}
- private void OkButton(object sender, RoutedEventArgs e)
- {
- ViewModel.OkButton();
- }
-
- private void CancelButton(object sender, RoutedEventArgs e)
- {
- ViewModel.CancelButton();
- }
-
- private void ApplyButton(object sender, RoutedEventArgs e)
- {
- ViewModel.ApplyButton();
- }
-
protected override void OnClosing(CancelEventArgs e)
{
HotkeysPage.Dispose();