From d666c4419047cb000c0e7a7daad24ffe838c4b3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Pen=CC=83alba?= Date: Tue, 11 Jun 2024 12:58:46 +0200 Subject: [PATCH] Update TextMateSharp to 1.0.57 --- Directory.Build.props | 2 +- .../TextMateColoringTransformer.cs | 2 +- src/AvaloniaEdit.TextMate/TextTransformation.cs | 12 ++++++------ 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index 41e35a3..a1b039b 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -4,7 +4,7 @@ true 11.0.0 11.0.6 - 1.0.56 + 1.0.57 beta true diff --git a/src/AvaloniaEdit.TextMate/TextMateColoringTransformer.cs b/src/AvaloniaEdit.TextMate/TextMateColoringTransformer.cs index b1df490..62ebf87 100644 --- a/src/AvaloniaEdit.TextMate/TextMateColoringTransformer.cs +++ b/src/AvaloniaEdit.TextMate/TextMateColoringTransformer.cs @@ -175,7 +175,7 @@ namespace AvaloniaEdit.TextMate background = themeRule.background; if (fontStyle == 0 && themeRule.fontStyle > 0) - fontStyle = themeRule.fontStyle; + fontStyle = (int)themeRule.fontStyle; } if (transformations[i] == null) diff --git a/src/AvaloniaEdit.TextMate/TextTransformation.cs b/src/AvaloniaEdit.TextMate/TextTransformation.cs index 268ddfa..e33a519 100644 --- a/src/AvaloniaEdit.TextMate/TextTransformation.cs +++ b/src/AvaloniaEdit.TextMate/TextTransformation.cs @@ -57,8 +57,8 @@ namespace AvaloniaEdit.TextMate AM.FontStyle GetFontStyle() { - if (FontStyle != TextMateSharp.Themes.FontStyle.NotSet && - (FontStyle & TextMateSharp.Themes.FontStyle.Italic) != 0) + if (FontStyle != (int)TextMateSharp.Themes.FontStyle.NotSet && + (FontStyle & (int)TextMateSharp.Themes.FontStyle.Italic) != 0) return AM.FontStyle.Italic; return AM.FontStyle.Normal; @@ -66,8 +66,8 @@ namespace AvaloniaEdit.TextMate AM.FontWeight GetFontWeight() { - if (FontStyle != TextMateSharp.Themes.FontStyle.NotSet && - (FontStyle & TextMateSharp.Themes.FontStyle.Bold) != 0) + if (FontStyle != (int)TextMateSharp.Themes.FontStyle.NotSet && + (FontStyle & (int)TextMateSharp.Themes.FontStyle.Bold) != 0) return AM.FontWeight.Bold; return AM.FontWeight.Regular; @@ -75,8 +75,8 @@ namespace AvaloniaEdit.TextMate bool IsUnderline() { - if (FontStyle != TextMateSharp.Themes.FontStyle.NotSet && - (FontStyle & TextMateSharp.Themes.FontStyle.Underline) != 0) + if (FontStyle != (int)TextMateSharp.Themes.FontStyle.NotSet && + (FontStyle & (int)TextMateSharp.Themes.FontStyle.Underline) != 0) return true; return false;