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



On Fri, 2012-07-06 at 08:54 -0700, Joel Madero wrote:
haha digging a ditch for myself ;) I think I now am following the
logic of MouseButtonDown but I'm still not seeing where it's being
called (and where rMEvt) is coming from. Basically where are the pixel
ranges defined as different actions (open vs. recent documents).

        rMEvt comes from the VCL - it will have the mouse event co-ordinates
correct; you don't want to change that bit :-)

https://bugs.freedesktop.org/show_bug.cgi?id=47164 

        For me this works fine:

    if ( mnMenuMode & MENUBUTTON_MENUMODE_TIMED )
    {
        // if the separated dropdown symbol is hit,
        // execute the popup immediately
        if( ! ImplGetSymbolRect().IsInside( rMEvt.GetPosPixel() ) )

        And my 'ImplGetSymbolRect()' method seems to return something sensible;
if you grok for 'SetSymbolRect' you can see what sets this.

            long nDistance = (aInRect.GetHeight() > 10) ? 2 : 1;
            DecorationView aDecoView( pDev );
            if( bMenuBtnSep )
            {
                long nX = aInRect.Left() - 2*nDistance;
                Point aStartPt( nX, aInRect.Top()+nDistance );
                Point aEndPt( nX, aInRect.Bottom()-nDistance );
                aDecoView.DrawSeparator( aStartPt, aEndPt );
            }
            aDecoView.DrawSymbol( aInRect, SYMBOL_SPIN_DOWN, aColor, nStyle );
            aInRect.Left() -= 2*nDistance;
            ImplSetSymbolRect( aInRect );

        Which already seems to nudge the left boundary further left so ... and
the way right-to-left works that should work in that mode too.

        So - I don't really follow the bug; we could of course move the
separator further across and make that drop-down area larger with some
tweaks to the logic there, though that needs some UX input I think.

        It seems (oddly, but ~normal for VCL) that most of the menubutton logic
lives in 'button.cxx' itself as special cases ;-) so best to poke there
really.

        HTH !

                Michael.

-- 
michael.meeks@suse.com  <><, Pseudo Engineer, itinerant idiot


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.