From 361bfeb1a09b0ac2c02da71fd2a457ffbdd9e6fe Mon Sep 17 00:00:00 2001 From: Dariusz Komosinski Date: Thu, 3 Feb 2022 13:27:09 +0100 Subject: [PATCH] Foreground can be nullable as well. --- src/Avalonia.Visuals/Media/TextFormatting/TextLayout.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Avalonia.Visuals/Media/TextFormatting/TextLayout.cs b/src/Avalonia.Visuals/Media/TextFormatting/TextLayout.cs index 85c2e4eb64..e3b14a5ac3 100644 --- a/src/Avalonia.Visuals/Media/TextFormatting/TextLayout.cs +++ b/src/Avalonia.Visuals/Media/TextFormatting/TextLayout.cs @@ -38,7 +38,7 @@ namespace Avalonia.Media.TextFormatting string? text, Typeface typeface, double fontSize, - IBrush foreground, + IBrush? foreground, TextAlignment textAlignment = TextAlignment.Left, TextWrapping textWrapping = TextWrapping.NoWrap, TextTrimming textTrimming = TextTrimming.None, @@ -478,7 +478,7 @@ namespace Avalonia.Media.TextFormatting /// The height of each line of text. /// private static TextParagraphProperties CreateTextParagraphProperties(Typeface typeface, double fontSize, - IBrush foreground, TextAlignment textAlignment, TextWrapping textWrapping, + IBrush? foreground, TextAlignment textAlignment, TextWrapping textWrapping, TextDecorationCollection? textDecorations, FlowDirection flowDirection, double lineHeight) { var textRunStyle = new GenericTextRunProperties(typeface, fontSize, textDecorations, foreground);