Browse Source
Merge pull request #12614 from Gillibald/fixes/textTrimmingWithWrap
Fix TextTrimming in combination with TextWrapping
pull/12637/head
Jumar Macato
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
1 additions and
1 deletions
-
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)) |
|
|
|
{ |
|
|
|
|