[Libreoffice-commits] .: svtools/source

Cédric Bosdonnat cbosdo at kemper.freedesktop.org
Mon Feb 7 02:37:59 PST 2011


 svtools/source/control/toolbarmenu.cxx |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 560ee224078b7b153c8acf305d5e3387dc46bcbc
Author: Cédric Bosdonnat <cedricbosdo at openoffice.org>
Date:   Mon Feb 7 11:30:59 2011 +0100

    Fixed ToolbarMenu drawing text over controls if any

diff --git a/svtools/source/control/toolbarmenu.cxx b/svtools/source/control/toolbarmenu.cxx
index 1ac3b9d..e8b4141 100644
--- a/svtools/source/control/toolbarmenu.cxx
+++ b/svtools/source/control/toolbarmenu.cxx
@@ -1491,8 +1491,9 @@ void ToolbarMenu::implPaint( ToolbarMenuEntry* pThisOnly, bool bHighlighted )
                             aTmpPos.X() = aOuterCheckRect.Left() + (aOuterCheckRect.GetWidth() - nCtrlHeight)/2;
                             aTmpPos.Y() = aOuterCheckRect.Top() + (aOuterCheckRect.GetHeight() - nCtrlHeight)/2;
                             
-                            Rectangle aCheckRect( aTmpPos, Size( nCtrlHeight, nCtrlHeight ) );                            
+                            Rectangle aCheckRect( aTmpPos, Size( nCtrlHeight, nCtrlHeight ) );
                             DrawNativeControl( CTRL_MENU_POPUP, nPart, aCheckRect, nState, ImplControlValue(), OUString() );
+                            aPos.setX( aPos.getX() + nCtrlHeight + 1 );
                         }
                         else if ( pEntry->mbChecked ) // by default do nothing for unchecked items
                         {
@@ -1514,6 +1515,7 @@ void ToolbarMenu::implPaint( ToolbarMenuEntry* pThisOnly, bool bHighlighted )
                             aTmpPos.Y() = aOuterCheckRect.Top() + (aOuterCheckRect.GetHeight() - aSymbolSize.Height())/2;
                             Rectangle aRect( aTmpPos, aSymbolSize );
                             aDecoView.DrawSymbol( aRect, eSymbol, GetTextColor(), nSymbolStyle );
+                            aPos.setX( aPos.getX() + aSymbolSize.getWidth( ) + 1 );
                         }
                     }
                 }


More information about the Libreoffice-commits mailing list