-
Notifications
You must be signed in to change notification settings - Fork 705
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 bug with UniformGridLayout MaximumRowsOrColumns and requested size #1802
Fix bug with UniformGridLayout MaximumRowsOrColumns and requested size #1802
Conversation
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
availableSizeMinor : | ||
std::max(0.0f, itemsCount * GetMinorSizeWithSpacing(context) - static_cast<float>(MinItemSpacing())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FlowLayout likely has the same issue as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just looked at FlowLayout(Algorithm).cpp and it didn't seem like that the same issue was also present there.
availableSizeMinor : | ||
std::max(0.0f, itemsCount * GetMinorSizeWithSpacing(context) - static_cast<float>(MinItemSpacing())); | ||
std::max(0.0f, itemsPerLine * GetMinorSizeWithSpacing(context) - static_cast<float>(MinItemSpacing())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
0.0f [](start = 21, length = 4)
Should this be capped to availableSizeMinor? @ranjeshj
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is correct. If there are any items present, we should size the extent based on the item sizes irrespective of what the available size that was provided by the parent.
In reply to: 362570947 [](ancestors = 362570947)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉 Handy links: |
Description
Fix bug where the UniformGridLayout would ignore thefact that it only renders a certain amount of columns/rows and then request the whole width/height instead of requesting what is needed.
Motivation and Context
Fixes #1549
How Has This Been Tested?
Added new API test.
Screenshots (if appropriate):