Hi all,

the bug: https://bugs.freedesktop.org/show_bug.cgi?id=41264

briefly: in the context menus (except the toolbar's ones) icons are not shown for radio menu items and for checked menu items.

Rainer assigned it to me, so... :)

looking at the drawing code (vcl/source/window/menu.cxx):

        // Image:
if ( !bLayout && !bIsMenuBar && ( ( pData->eType == MENUITEM_IMAGE ) || ( pData->eType == MENUITEM_STRINGIMAGE ) ) )
        {
            // Don't render an image for a check thing
            if ((nMenuFlags & MENU_FLAG_SHOWCHECKIMAGES) || !pData->HasCheck() )
            {
                [image drawing]
            }
        }

If an item "HasCheck()" then it _must_ have the MENU_FLAG_SHOWCHECKIMAGES bit enabled in nMenuFlags, otherwise icon will not be drawn. But nMenuFlags is 0 initially and according to opengrok...

        
http://opengrok.libreoffice.org/search?q=MENU_FLAG_SHOWCHECKIMAGES&project=core&defs=!MENU_FLAG_SHOWCHECKIMAGES&refs=&path=&hist=

... MENU_FLAG_SHOWCHECKIMAGES is only set for menubar and toolbar.

[ By the way, what is svtools/source/control/toolbarmenu.cxx ? (the drawing code is like in the vcl's menu.cxx ?) ]

so, summing up :) I would like to remove the
        if ((nMenuFlags & MENU_FLAG_SHOWCHECKIMAGES) || !pData->HasCheck() )
line and in general the MENU_FLAG_SHOWCHECKIMAGES flag, as I can't ever understand why it has been introduced. Any counterarguments?

Best Regards,
Ivan
_______________________________________________
LibreOffice mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice

Reply via email to