From 2e40b436aa6e6738feb4637a43442944be7403a9 Mon Sep 17 00:00:00 2001 From: Evan Husted Date: Tue, 28 Jan 2025 21:18:49 -0600 Subject: [PATCH] UI: [ci skip] Make cheat window larger by default --- src/Ryujinx/UI/Models/CheatNode.cs | 2 +- src/Ryujinx/UI/Windows/CheatWindow.axaml | 4 ++-- src/Ryujinx/UI/Windows/CheatWindow.axaml.cs | 3 +++ 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/Ryujinx/UI/Models/CheatNode.cs b/src/Ryujinx/UI/Models/CheatNode.cs index 8e9aee254..153a1891a 100644 --- a/src/Ryujinx/UI/Models/CheatNode.cs +++ b/src/Ryujinx/UI/Models/CheatNode.cs @@ -9,7 +9,7 @@ namespace Ryujinx.Ava.UI.Models { private bool _isEnabled = false; public ObservableCollection SubNodes { get; } = new(); - public string CleanName => Name[1..^7]; + public string CleanName => Name.Length > 0 ? Name[1..^7] : Name; public string BuildIdKey => $"{BuildId}-{Name}"; public bool IsRootNode { get; } public string Name { get; } diff --git a/src/Ryujinx/UI/Windows/CheatWindow.axaml b/src/Ryujinx/UI/Windows/CheatWindow.axaml index 4311014fe..e9050cdf4 100644 --- a/src/Ryujinx/UI/Windows/CheatWindow.axaml +++ b/src/Ryujinx/UI/Windows/CheatWindow.axaml @@ -7,8 +7,8 @@ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:model="clr-namespace:Ryujinx.Ava.UI.Models" xmlns:window="clr-namespace:Ryujinx.Ava.UI.Windows" - Width="500" - Height="500" + Width="600" + Height="750" MinWidth="500" MinHeight="500" x:DataType="window:CheatWindow" diff --git a/src/Ryujinx/UI/Windows/CheatWindow.axaml.cs b/src/Ryujinx/UI/Windows/CheatWindow.axaml.cs index b9acef32a..8f5c3a62e 100644 --- a/src/Ryujinx/UI/Windows/CheatWindow.axaml.cs +++ b/src/Ryujinx/UI/Windows/CheatWindow.axaml.cs @@ -35,6 +35,9 @@ namespace Ryujinx.Ava.UI.Windows public CheatWindow(VirtualFileSystem virtualFileSystem, string titleId, string titleName, string titlePath) { + MinWidth = 500; + MinHeight = 650; + LoadedCheats = new AvaloniaList(); IntegrityCheckLevel checkLevel = ConfigurationState.Instance.System.EnableFsIntegrityChecks ? IntegrityCheckLevel.ErrorOnInvalid