Fix Window/wrap_controls
does not account for the content_scale_factor
#91971
+1
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Previously
wrap_controls
allows a window to self-determine its best minimum size for displaying its children Controls, however, such calculation forgot to include thecontent_scale_factor
, which leads the window too big (if the scale factor is less than one) or too small (if the scale factor is larger than one) for itscontent_scale_factor
applied children.QQ2024515-52755.mp4
In this PR
I multiplied the results of the
Window::_get_contents_minimum_size()
withcontent_scale_factor
, which results in the correct size.QQ2024515-152828.mp4
Closes #91960