Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix TextLayout overflow #17914

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

dme-compunet
Copy link
Contributor

What does the pull request do?

Fixes a bug that causes TextLayout to be larger than the control bounds, resulting in multi-line text sometimes being displayed truncated

What is the current behavior?

bug2

What is the updated/expected behavior with this PR?

fix2

How was the solution implemented (if it's not obvious)?

Corrected logic in TextPresenter.ArrangeOverride to check the actual finalSize instead of finalSize including trailing whitespace for TextLayout constraint size.

Checklist

@avaloniaui-bot
Copy link

You can test this PR using the following package version. 11.3.999-cibuild0054135-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@robloo
Copy link
Contributor

robloo commented Jan 8, 2025

Comments directly in source code explaining this would be useful. It's important information that can be lost in a refactor.

@avaloniaui-bot
Copy link

You can test this PR using the following package version. 11.3.999-cibuild0054153-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants