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 TextBlock re-measure in infinite container #17638

Merged
merged 4 commits into from
Nov 30, 2024

Conversation

MrJul
Copy link
Member

@MrJul MrJul commented Nov 28, 2024

What does the pull request do?

This PR fixes a TextBlock not re-measuring itself it it's contained in an infinite container and its TextLayout is created.
See #17637 for details.

A unit test has been added.

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

An invalid constraint (NaN) is set at the start, so it will never match anything else by default.

Fixed issues

@MrJul MrJul added bug regression backport-candidate-11.1.x Consider this PR for backporting to 11.1 branch backport-candidate-11.2.x Consider this PR for backporting to 11.2 branch labels Nov 28, 2024
@Gillibald
Copy link
Contributor

Gillibald commented Nov 29, 2024

Looks good

@jmacato jmacato enabled auto-merge November 29, 2024 06:11
@avaloniaui-bot
Copy link

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

@jmacato jmacato added this pull request to the merge queue Nov 30, 2024
Merged via the queue into AvaloniaUI:master with commit f4633e2 Nov 30, 2024
10 checks passed
maxkatz6 added a commit that referenced this pull request Dec 19, 2024
* Add failing test for TextBlock

* Fix TextBlock re-measure in infinite container

* Fix outdated test

---------

Co-authored-by: Max Katz <maxkatz6@outlook.com>
@maxkatz6 maxkatz6 added backported-11.2.x and removed backport-candidate-11.2.x Consider this PR for backporting to 11.2 branch labels Dec 19, 2024
@MrJul MrJul deleted the fix/textblock-infinity-measure branch December 21, 2024 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-candidate-11.1.x Consider this PR for backporting to 11.1 branch backported-11.2.x bug regression
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Changing TextBlock.Text placed inside an infinite-sized invisible container doesn't re-measure the TextBlock
5 participants