Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


Sure thing. I'll try to fix it tonight. As for the magic numbers, I agree,
the original way it was done just wasn't good in my opinion and made fixing
it hard and partly redundant. It might take me an extra day or two because
I might try to make it a bit cleaner than it currently is. The original
code linked the size of the arrow with the hot spot which meant to increase
the size of the hotspot you automatically increased the size of the arrow.

As for nX, this was simply copied from the original code. I'll relook at it
but for some reason I remember getting an error when I removed it.

Give me a day or two.

Joel



On Tue, Jul 24, 2012 at 9:23 AM, Ivan Timofeev <timofeev.i.s@gmail.com>wrote:

Hi Joel,

 fdo: #47164:


it should be fdo#47164, otherwise the commit would not be recognized as a
bug-fix.

  Please enter the commit message for your changes. Lines starting

...

How did you manage to get this lines in the commit message? :) Please
remove those.

 -    pDev->DrawRect( Rectangle( nX+0, nY+0, nX+6, nY+0 ) );
+    pDev->DrawRect( Rectangle( nX-0, nY+0, nX+6, nY+0 ) );


By the way, such changes make reviewing harder.


 +        if( ! bLayout )
+        {
+            long nDistance = (aInRect.GetHeight() > 10) ? 2 : 1;
+            DecorationView aDecoView( pDev );
+            if( bMenuBtnSep )
+            {
+                long nX = aInRect.Left() - 3*nDistance;
+            }

+            aDecoView.DrawSymbol( aInRect, SYMBOL_SPIN_DOWN, aColor,
nStyle );
+        }


nX is unused (and thus nDistance is unused as well). What was the
intension here?


 @@ -880,13 +900,12 @@ void PushButton::**ImplDrawPushButtonContent(
OutputDevice* pDev, sal_uLong nDrawF
             DecorationView aDecoView( pDev );
             if( bMenuBtnSep )
             {
-                long nX = aInRect.Left() - 2*nDistance;
-                Point aStartPt( nX, aInRect.Top()+nDistance );
+                long nX = aInRect.Left() - 3*nDistance;
+                Point aStartPt( nX+10, aInRect.Top()+nDistance );
                 Point aEndPt( nX, aInRect.Bottom()-nDistance );
                 aDecoView.DrawSeparator( aStartPt, aEndPt );
             }


the x coordinate is different in the start point and the end point. You
can see it, run:

 $ export SAL_USE_VCLPLUGIN=gen && ./install/program/soffice


I have absolutely no idea of those magic numbers that was there in
button.cxx, but it seems you adjusted them right, the patch in general
works fine.

Could you send an updated patch?

Thanks,

Ivan


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.