Browse Source

Include the TextLine's Start offset to the TextLayout's size calculation.

pull/5853/head
Benedikt Stebner 5 years ago
parent
commit
9bc9cd46fe
  1. 6
      src/Avalonia.Visuals/Media/TextFormatting/TextLayout.cs

6
src/Avalonia.Visuals/Media/TextFormatting/TextLayout.cs

@ -305,9 +305,11 @@ namespace Avalonia.Media.TextFormatting
/// <param name="height">The current height.</param>
private static void UpdateBounds(TextLine textLine, ref double width, ref double height)
{
if (width < textLine.Width)
var lineWidth = textLine.Width + textLine.Start * 2;
if (width < lineWidth)
{
width = textLine.Width;
width = lineWidth;
}
height += textLine.Height;

Loading…
Cancel
Save