Kaynağa Gözat

UI: compat: remove custom ContentDialog derived type

Evan Husted 1 yıl önce
ebeveyn
işleme
5efa7d5dfa

+ 3 - 3
docs/compatibility.csv

@@ -4303,6 +4303,6 @@ issue_number,issue_title,extracted_game_id,issue_labels,extracted_status,last_ev
 5079,Legend of Heroes: Trails Through Daybreak - 010040C01D248000,010040C01D248000,,,2024-10-01 7:36:25,1
 100001,Mario & Luigi: Brothership - 01006D0017F7A000,01006D0017F7A000,status-ingame;crash;slow;UE4;mac-bug,ingame,2025-01-07 4:00:00,1
 100002,Stray - 010075101EF84000,010075101EF84000,status-ingame;crash,ingame,2025-01-07 4:03:00,1
-100003,Dragon Quest III HD-2D Remake - 01003E601E324000,01003E601E324000,status-ingame;vulkan-backend-bug;UE4;audout;mac-bug;ingame,2025-01-07 4:10:27,1
-100004,SONIC X SHADOW GENERATIONS - 01005EA01C0fC000,01005EA01C0fC000,status-ingame;crash;2025-01-07 4:20:45,1
-100005,LEGO Horizon Adventures - 010073C01AF34000,010073C01AF34000,status-ingame;vulkan-backend-bug;opengl-backend-bug;UE4;2025-01-07 4:24:56,1
+100003,Dragon Quest III HD-2D Remake - 01003E601E324000,01003E601E324000,status-ingame;vulkan-backend-bug;UE4;audout;mac-bug,ingame,2025-01-07 4:10:27,1
+100004,SONIC X SHADOW GENERATIONS - 01005EA01C0fC000,01005EA01C0fC000,status-ingame;crash,ingame,2025-01-07 4:20:45,1
+100005,LEGO Horizon Adventures - 010073C01AF34000,010073C01AF34000,status-ingame;vulkan-backend-bug;opengl-backend-bug;UE4,ingame,2025-01-07 4:24:56,1

+ 1 - 1
src/Ryujinx/Assets/Styles/Styles.xaml

@@ -402,7 +402,7 @@
         <x:Double x:Key="ControlContentThemeFontSize">13</x:Double>
         <x:Double x:Key="MenuItemHeight">26</x:Double>
         <x:Double x:Key="TabItemMinHeight">28</x:Double>
-        <x:Double x:Key="ContentDialogMaxWidth">700</x:Double>
+        <x:Double x:Key="ContentDialogMaxWidth">900</x:Double>
         <x:Double x:Key="ContentDialogMaxHeight">756</x:Double>
     </Styles.Resources>
 </Styles>

+ 0 - 6
src/Ryujinx/Ryujinx.csproj

@@ -171,12 +171,6 @@
   <ItemGroup>
     <AdditionalFiles Include="Assets\locales.json" />
   </ItemGroup>
-  <ItemGroup>
-    <Compile Update="Utilities\Compat\CompatibilityContentDialog.axaml.cs">
-      <DependentUpon>CompatibilityContentDialog.axaml</DependentUpon>
-      <SubType>Code</SubType>
-    </Compile>
-  </ItemGroup>
   <ItemGroup>
     <Folder Include="Assets\Fonts\Mono\" />
   </ItemGroup>

+ 0 - 20
src/Ryujinx/Utilities/Compat/CompatibilityContentDialog.axaml

@@ -1,20 +0,0 @@
-<ui:ContentDialog xmlns="https://github.com/avaloniaui"
-                  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
-                  xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
-                  xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
-                  xmlns:local="using:Ryujinx.Ava.Utilities.Compat"
-                  xmlns:ui="using:FluentAvalonia.UI.Controls"
-                  xmlns:ext="using:Ryujinx.Ava.Common.Markup"
-                  x:Class="Ryujinx.Ava.Utilities.Compat.CompatibilityContentDialog"
-                  mc:Ignorable="d" d:DesignWidth="600" d:DesignHeight="400"
-                  CloseButtonText="{ext:Locale SettingsButtonClose}" 
-                  DefaultButton="Close"
-                  x:DataType="local:CompatibilityViewModel">
-    <ui:ContentDialog.DataContext>
-        <local:CompatibilityViewModel/>
-    </ui:ContentDialog.DataContext>
-    <ui:ContentDialog.Resources>
-        <x:Double x:Key="ContentDialogMaxWidth">900</x:Double>
-    </ui:ContentDialog.Resources>
-</ui:ContentDialog>
-

+ 0 - 13
src/Ryujinx/Utilities/Compat/CompatibilityContentDialog.axaml.cs

@@ -1,13 +0,0 @@
-using FluentAvalonia.UI.Controls;
-using System;
-
-namespace Ryujinx.Ava.Utilities.Compat
-{
-    public partial class CompatibilityContentDialog : ContentDialog
-    {
-        protected override Type StyleKeyOverride => typeof(ContentDialog);
-        
-        public CompatibilityContentDialog() => InitializeComponent();
-    }
-}
-

+ 11 - 3
src/Ryujinx/Utilities/Compat/CompatibilityList.axaml.cs

@@ -1,6 +1,8 @@
 using Avalonia.Controls;
 using Avalonia.Styling;
+using FluentAvalonia.UI.Controls;
 using nietras.SeparatedValues;
+using Ryujinx.Ava.Common.Locale;
 using Ryujinx.Ava.UI.Helpers;
 using System.IO;
 using System.Reflection;
@@ -19,11 +21,17 @@ namespace Ryujinx.Ava.Utilities.Compat
                 csvStream.Position = 0;
 
                 CompatibilityCsv.Shared = new CompatibilityCsv(Sep.Reader().From(csvStream));
-            } 
+            }
             
-            CompatibilityContentDialog contentDialog = new()
+            ContentDialog contentDialog = new()
             {
-                Content = new CompatibilityList { DataContext = new CompatibilityViewModel(RyujinxApp.MainWindow.ViewModel.ApplicationLibrary) }
+                PrimaryButtonText = string.Empty,
+                SecondaryButtonText = string.Empty,
+                CloseButtonText = LocaleManager.Instance[LocaleKeys.SettingsButtonClose],
+                Content = new CompatibilityList
+                {
+                    DataContext = new CompatibilityViewModel(RyujinxApp.MainWindow.ViewModel.ApplicationLibrary)
+                }
             };
 
             Style closeButton = new(x => x.Name("CloseButton"));