From 610eecc1c1fec2203fff1ebd71cd10798fbcc05a Mon Sep 17 00:00:00 2001 From: Ac_K Date: Mon, 9 Jan 2023 04:37:20 +0100 Subject: ava: Fixes regressions from refactoring (#4237) * ava: Fix regressions from #4178 * Remove duplicated code * real fix for right click menu Co-Authored-By: Isaac Marovitz <42140194+IsaacMarovitz@users.noreply.github.com> * Remove ContentDialogOverlay Co-authored-by: Isaac Marovitz <42140194+IsaacMarovitz@users.noreply.github.com> --- Ryujinx.Ava/UI/Windows/AboutWindow.axaml.cs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'Ryujinx.Ava/UI/Windows/AboutWindow.axaml.cs') diff --git a/Ryujinx.Ava/UI/Windows/AboutWindow.axaml.cs b/Ryujinx.Ava/UI/Windows/AboutWindow.axaml.cs index 5dbbbcdd..36a28605 100644 --- a/Ryujinx.Ava/UI/Windows/AboutWindow.axaml.cs +++ b/Ryujinx.Ava/UI/Windows/AboutWindow.axaml.cs @@ -4,6 +4,7 @@ using Avalonia.Interactivity; using Avalonia.Styling; using FluentAvalonia.UI.Controls; using Ryujinx.Ava.Common.Locale; +using Ryujinx.Ava.UI.Helpers; using Ryujinx.Ava.UI.ViewModels; using Ryujinx.Ui.Common.Helper; using System.Threading.Tasks; @@ -22,14 +23,12 @@ namespace Ryujinx.Ava.UI.Windows public static async Task Show() { - var content = new AboutWindow(); - ContentDialog contentDialog = new() { - PrimaryButtonText = "", + PrimaryButtonText = "", SecondaryButtonText = "", - CloseButtonText = LocaleManager.Instance[LocaleKeys.UserProfilesClose], - Content = content + CloseButtonText = LocaleManager.Instance[LocaleKeys.UserProfilesClose], + Content = new AboutWindow() }; Style closeButton = new(x => x.Name("CloseButton")); @@ -41,7 +40,7 @@ namespace Ryujinx.Ava.UI.Windows contentDialog.Styles.Add(closeButton); contentDialog.Styles.Add(closeButtonParent); - await contentDialog.ShowAsync(); + await ContentDialogHelper.ShowAsync(contentDialog); } private void Button_OnClick(object sender, RoutedEventArgs e) -- cgit v1.2.3