[Libreoffice-commits] core.git: vcl/source

Caolán McNamara caolanm at redhat.com
Thu Jan 9 04:13:57 PST 2014


 vcl/source/window/layout.cxx |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

New commits:
commit 03e0781145bceebca84e5d891ed0df72c75389da
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Jan 9 12:04:43 2014 +0000

    stop condition reversed, sigh
    
    Change-Id: If96d982bf4377eab29a2dfb94b0a453e12450786

diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx
index 72297af..73a1aae 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;
             }
 


More information about the Libreoffice-commits mailing list