From 76f02c23ffff5dd442c78994eda1e6853cfe7e55 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Sun, 3 Jun 2012 23:32:48 +0100 Subject: assume for all menus we reserve space for checkboxes so menus have consistent whitespace at left regardless of containing checkboxes/radiobutton entries. Its nasty to have menus "suddenly" appear without whitespace as submenus of ones with whitespace. This is a logical consequence of MENU_FLAG_SHOWCHECKIMAGES always set (in the absence of SetMenuFlags where usage has generally dropped MENU_FLAG_SHOWCHECKIMAGES accidentally) Change-Id: I9501381b91415131eff5143a0c88142221530fb6 --- svtools/source/control/toolbarmenu.cxx | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'svtools') diff --git a/svtools/source/control/toolbarmenu.cxx b/svtools/source/control/toolbarmenu.cxx index 84b8af03cf5f..888b22599638 100644 --- a/svtools/source/control/toolbarmenu.cxx +++ b/svtools/source/control/toolbarmenu.cxx @@ -1473,16 +1473,12 @@ void ToolbarMenu::implPaint( ToolbarMenuEntry* pThisOnly, bool bHighlighted ) // Image: if( pEntry->mbHasImage && bUseImages ) { - // Don't render an image for a check thing - /* if((nMenuFlags & MENU_FLAG_SHOWCHECKIMAGES) || !pEntry->HasCheck() )*/ - { - if( pEntry->mbChecked ) - ImplPaintCheckBackground( this, aOuterCheckRect, pThisOnly && bHighlighted ); - aTmpPos = aOuterCheckRect.TopLeft(); - aTmpPos.X() += (aOuterCheckRect.GetWidth()-pEntry->maImage.GetSizePixel().Width())/2; - aTmpPos.Y() += (aOuterCheckRect.GetHeight()-pEntry->maImage.GetSizePixel().Height())/2; - DrawImage( aTmpPos, pEntry->maImage, nImageStyle ); - } + if( pEntry->mbChecked ) + ImplPaintCheckBackground( this, aOuterCheckRect, pThisOnly && bHighlighted ); + aTmpPos = aOuterCheckRect.TopLeft(); + aTmpPos.X() += (aOuterCheckRect.GetWidth()-pEntry->maImage.GetSizePixel().Width())/2; + aTmpPos.Y() += (aOuterCheckRect.GetHeight()-pEntry->maImage.GetSizePixel().Height())/2; + DrawImage( aTmpPos, pEntry->maImage, nImageStyle ); } // Text: -- cgit