From bef3ee248acb1f20a9f471885705e452f6270ce4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 8 Apr 2026 22:37:31 +0000 Subject: [PATCH 1/6] Bump Avalonia, Avalonia.AvaloniaEdit and AvaloniaEdit.TextMate Bumps Avalonia from 11.3.13 to 12.0.0 Bumps Avalonia.AvaloniaEdit from 11.4.1 to 12.0.0 Bumps AvaloniaEdit.TextMate from 11.4.1 to 12.0.0 --- updated-dependencies: - dependency-name: Avalonia dependency-version: 12.0.0 dependency-type: direct:production update-type: version-update:semver-major - dependency-name: Avalonia.AvaloniaEdit dependency-version: 12.0.0 dependency-type: direct:production update-type: version-update:semver-major - dependency-name: AvaloniaEdit.TextMate dependency-version: 12.0.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- Editor/Editor.csproj | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Editor/Editor.csproj b/Editor/Editor.csproj index 7b21061..0985930 100644 --- a/Editor/Editor.csproj +++ b/Editor/Editor.csproj @@ -18,9 +18,9 @@ - - - + + + From 9b179fc89be44a634cbb76af0fd04d6dc64f43c3 Mon Sep 17 00:00:00 2001 From: Jack251970 <1160210343@qq.com> Date: Thu, 9 Apr 2026 15:00:14 +0800 Subject: [PATCH 2/6] Update ToolBarButton_GotFocus event handler parameter Changed ToolBarButton_GotFocus parameter from GotFocusEventArgs to FocusChangingEventArgs in CharacterToolBar.axaml.cs and EquationToolBar.axaml.cs to align with updated event signature. --- Editor/Controls/CharacterToolBar.axaml.cs | 2 +- Editor/Controls/EquationToolBar.axaml.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Editor/Controls/CharacterToolBar.axaml.cs b/Editor/Controls/CharacterToolBar.axaml.cs index 65a4c91..b2e7d46 100644 --- a/Editor/Controls/CharacterToolBar.axaml.cs +++ b/Editor/Controls/CharacterToolBar.axaml.cs @@ -37,7 +37,7 @@ private void ToolBarButton_PointerEntered(object? sender, PointerEventArgs e) } } - private void ToolBarButton_GotFocus(object? sender, GotFocusEventArgs e) + private void ToolBarButton_GotFocus(object? sender, FocusChangingEventArgs e) { if (sender is Button) { diff --git a/Editor/Controls/EquationToolBar.axaml.cs b/Editor/Controls/EquationToolBar.axaml.cs index 2e22f64..42bfca4 100644 --- a/Editor/Controls/EquationToolBar.axaml.cs +++ b/Editor/Controls/EquationToolBar.axaml.cs @@ -39,7 +39,7 @@ private void ToolBarButton_PointerEntered(object? sender, PointerEventArgs e) } } - private void ToolBarButton_GotFocus(object? sender, GotFocusEventArgs e) + private void ToolBarButton_GotFocus(object? sender, FocusChangingEventArgs e) { if (sender is Button) { From b58541a8495fd380eb9fdeda6ce45af0f4733f46 Mon Sep 17 00:00:00 2001 From: Jack251970 <1160210343@qq.com> Date: Thu, 9 Apr 2026 15:00:25 +0800 Subject: [PATCH 3/6] Replace SystemDecorations with WindowDecorations Updated IMainWindow and MainWindowViewModel to use WindowDecorations instead of SystemDecorations for managing window decorations, including handling of full-screen mode transitions. --- Editor/Interfaces/IMainWindow.cs | 2 +- Editor/ViewModels/MainWindowViewModel.cs | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Editor/Interfaces/IMainWindow.cs b/Editor/Interfaces/IMainWindow.cs index 28feb85..76a0963 100644 --- a/Editor/Interfaces/IMainWindow.cs +++ b/Editor/Interfaces/IMainWindow.cs @@ -10,7 +10,7 @@ public interface IMainWindow TopLevel TopLevel { get; } WindowState WindowState { get; set; } - SystemDecorations SystemDecorations { get; set; } + WindowDecorations WindowDecorations { get; set; } bool ContentDialogShown { get; } bool IsSelecting { get; set; } bool IsEditorLoaded { get; } diff --git a/Editor/ViewModels/MainWindowViewModel.cs b/Editor/ViewModels/MainWindowViewModel.cs index 1cee8f0..62abf52 100644 --- a/Editor/ViewModels/MainWindowViewModel.cs +++ b/Editor/ViewModels/MainWindowViewModel.cs @@ -26,7 +26,7 @@ public partial class MainWindowViewModel : ObservableObject, ICultureInfoChanged private MenuItem _recentFileItem = null!; private WindowState _windowState; - private SystemDecorations _systemDecorations; + private WindowDecorations _windowDecorations; private bool _fullScreenModeEntered; private readonly Lock _fullScreenModeLock = new(); @@ -353,9 +353,9 @@ public void EnterFullScreen() if (_fullScreenModeEntered) return; _windowState = MainWindow.WindowState; - _systemDecorations = MainWindow.SystemDecorations; + _windowDecorations = MainWindow.WindowDecorations; MainWindow.WindowState = WindowState.FullScreen; - MainWindow.SystemDecorations = SystemDecorations.None; + MainWindow.WindowDecorations = WindowDecorations.None; _fullScreenModeEntered = true; } @@ -373,7 +373,7 @@ public void ExitFullScreen(WindowState windowState) if (!_fullScreenModeEntered) return; MainWindow.WindowState = windowState; - MainWindow.SystemDecorations = _systemDecorations; + MainWindow.WindowDecorations = _windowDecorations; _fullScreenModeEntered = false; } From bffa1b524b59661ea42c8f6b3196ad2afda6807c Mon Sep 17 00:00:00 2001 From: Jack251970 <1160210343@qq.com> Date: Thu, 9 Apr 2026 15:07:49 +0800 Subject: [PATCH 4/6] Update ToolBarButton_GotFocus event argument type Changed ToolBarButton_GotFocus parameter from FocusChangingEventArgs to FocusChangedEventArgs in CharacterToolBar.axaml.cs and EquationToolBar.axaml.cs to match the correct event signature. --- Editor/Controls/CharacterToolBar.axaml.cs | 2 +- Editor/Controls/EquationToolBar.axaml.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Editor/Controls/CharacterToolBar.axaml.cs b/Editor/Controls/CharacterToolBar.axaml.cs index b2e7d46..b9a9340 100644 --- a/Editor/Controls/CharacterToolBar.axaml.cs +++ b/Editor/Controls/CharacterToolBar.axaml.cs @@ -37,7 +37,7 @@ private void ToolBarButton_PointerEntered(object? sender, PointerEventArgs e) } } - private void ToolBarButton_GotFocus(object? sender, FocusChangingEventArgs e) + private void ToolBarButton_GotFocus(object? sender, FocusChangedEventArgs e) { if (sender is Button) { diff --git a/Editor/Controls/EquationToolBar.axaml.cs b/Editor/Controls/EquationToolBar.axaml.cs index 42bfca4..d444c0c 100644 --- a/Editor/Controls/EquationToolBar.axaml.cs +++ b/Editor/Controls/EquationToolBar.axaml.cs @@ -39,7 +39,7 @@ private void ToolBarButton_PointerEntered(object? sender, PointerEventArgs e) } } - private void ToolBarButton_GotFocus(object? sender, FocusChangingEventArgs e) + private void ToolBarButton_GotFocus(object? sender, FocusChangedEventArgs e) { if (sender is Button) { From 702fc314bfe811caa8e20ecf6b0ee61c24840fe9 Mon Sep 17 00:00:00 2001 From: Jack251970 <1160210343@qq.com> Date: Thu, 9 Apr 2026 15:08:18 +0800 Subject: [PATCH 5/6] Improve typeface character check for glyph existence Updated the logic to check if a typeface contains a character by using CharacterToGlyphMap.TryGetGlyph and verifying the glyph index is greater than zero. This enhances accuracy over the previous TryGetGlyph approach. --- Editor/ViewModels/UnicodeSelectorWindowViewModel.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Editor/ViewModels/UnicodeSelectorWindowViewModel.cs b/Editor/ViewModels/UnicodeSelectorWindowViewModel.cs index a952b25..c1c46fb 100644 --- a/Editor/ViewModels/UnicodeSelectorWindowViewModel.cs +++ b/Editor/ViewModels/UnicodeSelectorWindowViewModel.cs @@ -130,8 +130,12 @@ private static bool TypefaceContainsCharacter(Typeface typeface, char characterT try { var glyphTypeface = typeface.GlyphTypeface; - uint codepoint = characterToCheck; - return glyphTypeface.TryGetGlyph(codepoint, out _); + int codepoint = characterToCheck; + if (glyphTypeface.CharacterToGlyphMap.TryGetGlyph(codepoint, out ushort glyphIndex)) + { + return glyphIndex > 0; + } + return false; } catch (Exception e) { From c8d93cd16ab049457219340da5863275f724a2a4 Mon Sep 17 00:00:00 2001 From: Jack251970 <1160210343@qq.com> Date: Thu, 9 Apr 2026 15:12:10 +0800 Subject: [PATCH 6/6] Update README to reference Avalonia 12 Updated the desktop UI framework version in the README from Avalonia 11+ to Avalonia 12 to reflect the current project dependencies. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 50e35e7..92c75f8 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ Open-source, cross-platform equation editor built with Avalonia. A modern, free alternative to MathType for creating mathematical and scientific documents. - Cross-platform: Windows, macOS, and Linux -- Fast desktop UI: Avalonia 11 +- Fast desktop UI: Avalonia 12 - Modern .NET: .NET 10 - Open source: MIT licensed