don't distribute negative extra space among box sizer items, this isn't useful as it results in overlapping windows (#10008)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56010 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1939,6 +1939,12 @@ void wxBoxSizer::RecalcSizes()
|
|||||||
|
|
||||||
// adjust the size in the major direction using the proportion
|
// adjust the size in the major direction using the proportion
|
||||||
wxCoord majorSize = GetSizeInMajorDir(sizeThis);
|
wxCoord majorSize = GetSizeInMajorDir(sizeThis);
|
||||||
|
|
||||||
|
// if there is not enough space, don't try to distribute negative space
|
||||||
|
// among the children, this would result in overlapping windows which
|
||||||
|
// we don't want
|
||||||
|
if ( delta > 0 )
|
||||||
|
{
|
||||||
const int propItem = item->GetProportion();
|
const int propItem = item->GetProportion();
|
||||||
if ( propItem )
|
if ( propItem )
|
||||||
{
|
{
|
||||||
@@ -1949,6 +1955,7 @@ void wxBoxSizer::RecalcSizes()
|
|||||||
delta -= deltaItem;
|
delta -= deltaItem;
|
||||||
totalProportion -= propItem;
|
totalProportion -= propItem;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// apply the alignment in the minor direction
|
// apply the alignment in the minor direction
|
||||||
|
Reference in New Issue
Block a user