[PATCH] fdo#<47164>: <Start Center: Recent Documents picker can not be reached right third of separate button area>

Joel Madero jmadero.dev at gmail.com
Tue Jul 24 09:28:56 PDT 2012


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 at 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20120724/6cdf58e2/attachment.html>


More information about the LibreOffice mailing list