diff --git a/Editor/Controls/CharacterToolBar.axaml.cs b/Editor/Controls/CharacterToolBar.axaml.cs index 65a4c91..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, GotFocusEventArgs 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 2e22f64..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, GotFocusEventArgs e) + private void ToolBarButton_GotFocus(object? sender, FocusChangedEventArgs e) { if (sender is Button) { 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 @@ - - - + + + 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; } 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) { 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