FlexLayout distributes space optimally.
This changes long-standing problems with FlexLayout that were not problems with BoxLayout. Specifically: - Flex weights now dictate deviation from a view's preferred size (which may now be zero), so that when a view with a FlexLayout shrinks, its flex children shrink proportionately, just as they grow proportionately when the host view enlarges. - When a child view hits its minimum size or drops out, remaining space is correctly allocated across other child views, even at the same flex priority. This solves a number of weird corner cases and rounding issues at the result of a bit more complexity. However, the code is more heavily documented and broken into steps so the net effect is that it should be relatively maintainable. Bug: 1012134, 1012113 Change-Id: Idc3059d572b3d165866b44c077c38d483d862596 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2100026 Commit-Queue: Dana Fried <dfried@chromium.org> Reviewed-by:Xiaohui Chen <xiaohuic@chromium.org> Reviewed-by:
Peter Kasting <pkasting@chromium.org> Cr-Commit-Position: refs/heads/master@{#809245}
Showing
This diff is collapsed.
This diff is collapsed.
Please register or sign in to comment