]> git.saurik.com Git - wxWidgets.git/commit
Fix box sizer layout algorithm to respect both proportions and min sizes.
authorVadim Zeitlin <vadim@wxwidgets.org>
Thu, 18 Mar 2010 15:07:24 +0000 (15:07 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Thu, 18 Mar 2010 15:07:24 +0000 (15:07 +0000)
commit729f53d4213a02fc7131afb4649755f20b796270
treed3e513d3d5474ae845cba3209e95346bebb890b9
parenta71aeb242665ed42bab505391c3eb7058563499c
Fix box sizer layout algorithm to respect both proportions and min sizes.

The new version of the algorithm tries to distribute the entire space
allocated to the sizer among its children, just as the version in 2.8 did,
while still respecting minimal children sizes first and foremost. This means
that the space allocated to the item will always be at least its minimal size
if the total space is at least equal to the sum of minimal sizes of the
children but that if there is enough space, the proportions will be respected
too.

Extended the unit test to check that laying out various combinations of three
elements results in the expected results.

Closes #11311.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63706 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
src/common/sizer.cpp
tests/sizers/boxsizer.cpp