Fix showing ellipsis when word wrap and limited by height or MaxLines - #22025
Fix showing ellipsis when word wrap and limited by height or MaxLines#22025appel1 wants to merge 3 commits into
Conversation
|
A duplicate of #22017 This PR also complicates things a lot for no reason. Pass the last visible line's width as the collapsing width, and it will correctly collapse. |
|
Oh well, thought I had checked for other PRs, but obviously I failed. If the other one solves the issues we can just drop this one. |
|
You can test this PR using the following package version. |
|
With the #22017 PR the following tests I added fails. I don't think it is intended behavior. |
|
You can test this PR using the following package version. |
The changes in my pull request only address issues with the previous implementation; the handling of manual line breaks (\r\n) remains unchanged. As before, ellipses are displayed only when a string is wrapped (IsSplit = true). Since |
|
I updated the PR so that a height limit clips silently (no
A question here is if MaxLines + TextTrimming should show |
|
You can test this PR using the following package version. |
…in the available width No ellipsis is shown in this case so I guess it makes sense for Avalonia to behave the same.
|
Rebased onto latest |
|
You can test this PR using the following package version. |
What does the pull request do?
Fixes a bug
What is the current behavior?
Ellipsis is not shown when text is truncated when the TextBlock is limited by height or MaxLines.
What is the updated/expected behavior with this PR?
Ellipsis is shown when text is truncated.
Fixed issues
Fixes #17633