Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion UI/Debugger/Controls/HexEditor.cs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -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)) {
Expand Down
2 changes: 2 additions & 0 deletions UI/Debugger/DebuggerDockFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
}
2 changes: 1 addition & 1 deletion UI/Debugger/Windows/DebuggerWindow.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions UI/Styles/DockStyles.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,9 @@
and causes exceptions when trying to bind the values (including in tooltips
attached to a control in the dock control)
-->
<ItemsControl ItemsSource="{ReflectionBinding VisibleDockables}" Name="DockItemsControl">
<ItemsControl ItemsSource="{ReflectionBinding VisibleDockables}" Name="PART_ItemsControl">
<ItemsControl.Styles>
<Style Selector="ItemsControl#DockItemsControl > ContentPresenter">
<Style Selector="ItemsControl#PART_ItemsControl > ContentPresenter">
<Setter x:DataType="core:IDock" Property="(ProportionalStackPanel.Proportion)" Value="{Binding Proportion}" />

<!-- prevent error in binding -->
Expand Down
2 changes: 1 addition & 1 deletion UI/Styles/MesenStyles.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<StyleInclude Source="/Styles/MesenStyles.Light.xaml" />
<StyleInclude Source="/Styles/MesenStyles.Dark.xaml" />

<StyleInclude Source="avares://Dock.Avalonia/Themes/DockFluentTheme.axaml" />
<StyleInclude Source="avares://Dock.Avalonia.Themes.Fluent/DockFluentTheme.axaml" />
<StyleInclude Source="/ThirdParty/DataBox/Themes/Fluent.axaml" />
<StyleInclude Source="avares://AvaloniaEdit/Themes/Fluent/AvaloniaEdit.xaml" />
<StyleInclude Source="/Styles/DockStyles.xaml" />
Expand Down
19 changes: 10 additions & 9 deletions UI/UI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -108,15 +108,16 @@
<TrimmerRootAssembly Include="Dock.Settings" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Avalonia" Version="11.3.1" />
<PackageReference Include="Avalonia.AvaloniaEdit" Version="11.3.0" />
<PackageReference Include="Avalonia.Desktop" Version="11.3.1" />
<PackageReference Include="Avalonia.Controls.ColorPicker" Version="11.3.1" />
<PackageReference Include="Avalonia.Diagnostics" Version="11.3.1" Condition="'$(OptimizeUi)'!='true'" />
<PackageReference Include="Avalonia.ReactiveUI" Version="11.3.1" />
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.3.1" />
<PackageReference Include="Dock.Avalonia" Version="11.3.0.2" />
<PackageReference Include="Dock.Model.Mvvm" Version="11.3.0.2" />
<PackageReference Include="Avalonia" Version="11.3.14" />
<PackageReference Include="Avalonia.AvaloniaEdit" Version="11.4.1" />
<PackageReference Include="Avalonia.Desktop" Version="11.3.14" />
<PackageReference Include="Avalonia.Controls.ColorPicker" Version="11.3.14" />
<PackageReference Include="Avalonia.Diagnostics" Version="11.3.14" Condition="'$(OptimizeUi)'!='true'" />
<PackageReference Include="Avalonia.ReactiveUI" Version="11.3.8" />
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.3.14" />
<PackageReference Include="Dock.Avalonia" Version="11.3.12.1" />
<PackageReference Include="Dock.Avalonia.Themes.Fluent" Version="11.3.12.1" />
<PackageReference Include="Dock.Model.Mvvm" Version="11.3.12.1" />
<PackageReference Include="Dotnet.Bundle" Version="*" />
<PackageReference Include="ELFSharp" Version="2.17.3" />
<PackageReference Include="ReactiveUI.Fody" Version="19.5.41" />
Expand Down
2 changes: 1 addition & 1 deletion UI/Windows/MainWindow.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ private void Console_CancelKeyPress(object? sender, ConsoleCancelEventArgs 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) {
if(File.Exists(filename)) {
LoadRomHelper.LoadFile(filename);
Expand Down
Loading