From 78f41a0ec47016fb697b1082c10b2a6d8d8330fe Mon Sep 17 00:00:00 2001 From: Adrian Siekierka Date: Sun, 10 May 2026 16:03:56 +0200 Subject: [PATCH] UI: Update Avalonia to 11.3.14. - AvaloniaEdit is updated to 11.4.1. - Avalonia.ReactiveUI is held back at 11.3.8, as later updates require separate adaptation work. - Dock is updated to 11.3.12.1. --- UI/Debugger/Controls/HexEditor.cs | 3 ++- UI/Debugger/DebuggerDockFactory.cs | 2 ++ UI/Debugger/Windows/DebuggerWindow.axaml.cs | 2 +- UI/Styles/DockStyles.xaml | 4 ++-- UI/Styles/MesenStyles.xaml | 2 +- UI/UI.csproj | 19 ++++++++++--------- UI/Windows/MainWindow.axaml.cs | 2 +- 7 files changed, 19 insertions(+), 15 deletions(-) diff --git a/UI/Debugger/Controls/HexEditor.cs b/UI/Debugger/Controls/HexEditor.cs index 209ca0dd8..2c8f0fd2a 100644 --- a/UI/Debugger/Controls/HexEditor.cs +++ b/UI/Debugger/Controls/HexEditor.cs @@ -1,6 +1,7 @@ using Avalonia; using Avalonia.Controls; using Avalonia.Input; +using Avalonia.Input.Platform; using Avalonia.Media; using Mesen.Config; using Mesen.Debugger.Utilities; @@ -413,7 +414,7 @@ public async void PasteSelection() { var clipboard = ApplicationHelper.GetMainWindow()?.Clipboard; if(clipboard != null) { - string? text = await clipboard.GetTextAsync(); + string? text = await clipboard.TryGetTextAsync(); if(text != null) { text = text.Replace("\n", "").Replace("\r", ""); if(Regex.IsMatch(text, "^[ a-f0-9]+$", RegexOptions.IgnoreCase)) { diff --git a/UI/Debugger/DebuggerDockFactory.cs b/UI/Debugger/DebuggerDockFactory.cs index 77835036a..7e34821ef 100644 --- a/UI/Debugger/DebuggerDockFactory.cs +++ b/UI/Debugger/DebuggerDockFactory.cs @@ -267,4 +267,6 @@ public class DockEntryDefinition public class MesenProportionalDockSplitter : DockBase, IProportionalDockSplitter { //The regular ProportionalDockSplitter in Dock.Model.Mvvm.Controls inherits from DockableBase, which causes an exception when styles are applied + public bool CanResize { get; set; } = true; + public bool ResizePreview { get; set; } } diff --git a/UI/Debugger/Windows/DebuggerWindow.axaml.cs b/UI/Debugger/Windows/DebuggerWindow.axaml.cs index 15c922eab..779d13b81 100644 --- a/UI/Debugger/Windows/DebuggerWindow.axaml.cs +++ b/UI/Debugger/Windows/DebuggerWindow.axaml.cs @@ -232,7 +232,7 @@ private void OnSettingsClick(object sender, RoutedEventArgs e) private void OnDrop(object? sender, DragEventArgs e) { - string? filename = e.Data.GetFiles()?.FirstOrDefault()?.Path.LocalPath; + string? filename = e.DataTransfer.TryGetFiles()?.FirstOrDefault()?.Path.LocalPath; if(filename != null && File.Exists(filename)) { Activate(); DebugWorkspaceManager.LoadSupportedFile(filename, true); diff --git a/UI/Styles/DockStyles.xaml b/UI/Styles/DockStyles.xaml index 530419743..bf70d9179 100644 --- a/UI/Styles/DockStyles.xaml +++ b/UI/Styles/DockStyles.xaml @@ -141,9 +141,9 @@ and causes exceptions when trying to bind the values (including in tooltips attached to a control in the dock control) --> - + -