Fix for FlexLayout padding issue#24195
Merged
Merged
Conversation
…alculation in the Measure and ArrangeChildren method().
Member
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
Member
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
|
Azure Pipelines successfully started running 3 pipeline(s). |
|
Azure Pipelines successfully started running 3 pipeline(s). |
Member
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
Member
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
Member
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
PureWeen
requested changes
Aug 25, 2024
Member
PureWeen
left a comment
There was a problem hiding this comment.
For this one, instead of doing a screenshot test can we move these tests to the "UnitTests" ?
Since none of the changes in here depend on anything platformspecific?
Here's an example of some tests against the new FlexLayout
Member
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
Contributor
Author
@PureWeen I have updated the tests to Unit Tests, could you please validate once and let me know if there is any concerns |
PureWeen
requested changes
Aug 26, 2024
Member
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
PureWeen
requested changes
Aug 28, 2024
Member
|
/azp run |
PureWeen
approved these changes
Aug 29, 2024
|
Azure Pipelines successfully started running 3 pipeline(s). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Root cause
The FlexLayout doesn't include the padding value during its arrangement and measurement processes. As a result, the padding is not applied in the FlexLayout.
Description of Issue Fix
The fix involves updating the layout arrangement to include padding values, adjust bounds, and arrange children accordingly. The measurement process is adjusted to exclude padding during measurement, then add it back to determine the final size. This ensures accurate layout and measurement with proper padding.
Issues Fixed
Fixes #15991
Reference:
Referred code changes from HorizontalStackLayoutManager.cs file.
maui/src/Core/src/Layouts/HorizontalStackLayoutManager.cs
Line 12 in 210bc35
Output
Before fix:
After fix: