diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-06-03 23:32:48 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-06-05 10:14:46 +0100 |
commit | 76f02c23ffff5dd442c78994eda1e6853cfe7e55 (patch) | |
tree | 4e8149d6c161f586e0e84a57fc8e7f0df1fe91a1 /svtools | |
parent | e7e6d0f72b5388db3d0db17befb6fc0a00fa13c4 (diff) |
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
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/control/toolbarmenu.cxx | 16 |
1 files changed, 6 insertions, 10 deletions
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: |