Fix overhang calculation (#19013)
* - Adjusts the overhang calculation so it matches what WPF produces - Fixes baseline alignment for inline controls * Adjust OverhangTrailing Add unit test * Only run overhang unit test on Windows
This commit is contained in:
@@ -327,7 +327,7 @@ namespace TextTestApp
|
||||
protected Size TextLineSize => _textLineSize ??= TextLine is { } textLine ? new Size(textLine.WidthIncludingTrailingWhitespace, textLine.Height) : default;
|
||||
|
||||
private Size? _inkSize;
|
||||
protected Size InkSize => _inkSize ??= TextLine is { } textLine ? new Size(textLine.OverhangLeading + textLine.WidthIncludingTrailingWhitespace + textLine.OverhangTrailing, textLine.Extent) : default;
|
||||
protected Size InkSize => _inkSize ??= TextLine is { } textLine ? new Size(-textLine.OverhangLeading + textLine.WidthIncludingTrailingWhitespace - textLine.OverhangTrailing, textLine.Extent) : default;
|
||||
|
||||
public event EventHandler? TextLineChanged;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user