Locating Backing Window Recent Documents Object

Michael Meeks michael.meeks at suse.com
Fri Jul 6 12:36:27 PDT 2012


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 at suse.com  <><, Pseudo Engineer, itinerant idiot



More information about the LibreOffice mailing list