summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-01-09 12:04:43 +0000
committerCaolán McNamara <caolanm@redhat.com>2014-01-09 14:38:08 +0000
commitde9a62919fac612f793793bcb71c5137118b400a (patch)
tree2695de219c54b07d1458994665a3527ca7ca0b91 /vcl
parentf3a075f97f0cb13c0e73b567fb2d25374b147cf4 (diff)
stop condition reversed, sigh
Change-Id: If96d982bf4377eab29a2dfb94b0a453e12450786 (cherry picked from commit 03e0781145bceebca84e5d891ed0df72c75389da)
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/window/layout.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx
index 1532ce929cc4..27746c3020e4 100644
--- a/vcl/source/window/layout.cxx
+++ b/vcl/source/window/layout.cxx
@@ -1124,12 +1124,12 @@ void VclGrid::setAllocation(const Size& rAllocation)
//We don't fit and there is no volunteer to be shrunk
if (!nExpandables && rAllocation.Width() < aRequisition.Width())
{
- //first reduce spacing, to a min of 3
- while (nColSpacing >= 6)
+ //first reduce spacing
+ while (nColSpacing)
{
nColSpacing /= 2;
aRequisition = calculateRequisitionForSpacings(nRowSpacing, nColSpacing);
- if (aRequisition.Width() >= rAllocation.Width())
+ if (aRequisition.Width() <= rAllocation.Width())
break;
}
@@ -1167,12 +1167,12 @@ void VclGrid::setAllocation(const Size& rAllocation)
//We don't fit and there is no volunteer to be shrunk
if (!nExpandables && rAllocation.Height() < aRequisition.Height())
{
- //first reduce spacing, to a min of 3
- while (nRowSpacing >= 6)
+ //first reduce spacing
+ while (nRowSpacing)
{
nRowSpacing /= 2;
aRequisition = calculateRequisitionForSpacings(nRowSpacing, nColSpacing);
- if (aRequisition.Height() >= rAllocation.Height())
+ if (aRequisition.Height() <= rAllocation.Height())
break;
}