Kaydet (Commit) 03e07811 authored tarafından Caolán McNamara's avatar Caolán McNamara

stop condition reversed, sigh

Change-Id: If96d982bf4377eab29a2dfb94b0a453e12450786
üst d3aad812
...@@ -1124,12 +1124,12 @@ void VclGrid::setAllocation(const Size& rAllocation) ...@@ -1124,12 +1124,12 @@ void VclGrid::setAllocation(const Size& rAllocation)
//We don't fit and there is no volunteer to be shrunk //We don't fit and there is no volunteer to be shrunk
if (!nExpandables && rAllocation.Width() < aRequisition.Width()) if (!nExpandables && rAllocation.Width() < aRequisition.Width())
{ {
//first reduce spacing, to a min of 3 //first reduce spacing
while (nColSpacing >= 6) while (nColSpacing)
{ {
nColSpacing /= 2; nColSpacing /= 2;
aRequisition = calculateRequisitionForSpacings(nRowSpacing, nColSpacing); aRequisition = calculateRequisitionForSpacings(nRowSpacing, nColSpacing);
if (aRequisition.Width() >= rAllocation.Width()) if (aRequisition.Width() <= rAllocation.Width())
break; break;
} }
...@@ -1167,12 +1167,12 @@ void VclGrid::setAllocation(const Size& rAllocation) ...@@ -1167,12 +1167,12 @@ void VclGrid::setAllocation(const Size& rAllocation)
//We don't fit and there is no volunteer to be shrunk //We don't fit and there is no volunteer to be shrunk
if (!nExpandables && rAllocation.Height() < aRequisition.Height()) if (!nExpandables && rAllocation.Height() < aRequisition.Height())
{ {
//first reduce spacing, to a min of 3 //first reduce spacing
while (nRowSpacing >= 6) while (nRowSpacing)
{ {
nRowSpacing /= 2; nRowSpacing /= 2;
aRequisition = calculateRequisitionForSpacings(nRowSpacing, nColSpacing); aRequisition = calculateRequisitionForSpacings(nRowSpacing, nColSpacing);
if (aRequisition.Height() >= rAllocation.Height()) if (aRequisition.Height() <= rAllocation.Height())
break; break;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment