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


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

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.