Browse Source

Fix TextTrimming in combination with TextWrapping

pull/12614/head
Benedikt Stebner 3 years ago
parent
commit
f3625f0ee1
  1. 2
      src/Avalonia.Base/Media/TextFormatting/TextLineImpl.cs

2
src/Avalonia.Base/Media/TextFormatting/TextLineImpl.cs

@ -1278,7 +1278,7 @@ namespace Avalonia.Media.TextFormatting
var start = GetParagraphOffsetX(width, widthIncludingWhitespace);
var overhangLeading = Math.Max(0, bounds.Left - start);
var overhangTrailing = Math.Max(0, bounds.Width - widthIncludingWhitespace);
var hasOverflowed = overhangLeading + widthIncludingWhitespace + overhangTrailing > _paragraphWidth;
var hasOverflowed = width > _paragraphWidth;
if (!double.IsNaN(lineHeight) && !MathUtilities.IsZero(lineHeight))
{

Loading…
Cancel
Save