Skip to content

Commit

Permalink
Revert "Merge pull request #5853 from Gillibald/fixes/TextBlockHorizo…
Browse files Browse the repository at this point in the history
…ntalAlignment"

This reverts commit cb24755.
  • Loading branch information
danwalmsley committed Apr 30, 2021
1 parent 9a40956 commit cd98f3f
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/Avalonia.Visuals/Media/TextFormatting/TextLayout.cs
Original file line number Diff line number Diff line change
Expand Up @@ -166,11 +166,9 @@ private static TextParagraphProperties CreateTextParagraphProperties(Typeface ty
/// <param name="height">The current height.</param>
private static void UpdateBounds(TextLine textLine, ref double width, ref double height)
{
var lineWidth = textLine.Width + textLine.Start * 2;

if (width < lineWidth)
if (width < textLine.LineMetrics.Size.Width)
{
width = lineWidth;
width = textLine.LineMetrics.Size.Width;
}

height += textLine.LineMetrics.Size.Height;
Expand Down

0 comments on commit cd98f3f

Please sign in to comment.