[Libreoffice-commits] .: svtools/source
Caolán McNamara
caolan at kemper.freedesktop.org
Fri Feb 11 05:27:23 PST 2011
svtools/source/control/toolbarmenu.cxx | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
New commits:
commit e93adfca1859b618ff0854aeff8b938ef3783f89
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Feb 11 13:24:47 2011 +0000
try and use the same spacing between checkboxes and text as vcl does
diff --git a/svtools/source/control/toolbarmenu.cxx b/svtools/source/control/toolbarmenu.cxx
index 1a11b21..eee8219 100644
--- a/svtools/source/control/toolbarmenu.cxx
+++ b/svtools/source/control/toolbarmenu.cxx
@@ -697,6 +697,7 @@ static long ImplGetNativeCheckAndRadioSize( Window* pWin, long& rCheckHeight, lo
return (rCheckHeight > rRadioHeight) ? rCheckHeight : rRadioHeight;
}
+#define gfxExtra 7
Size ToolbarMenu::implCalcSize()
{
@@ -780,7 +781,7 @@ Size ToolbarMenu::implCalcSize()
ImplGetNativeCheckAndRadioSize( this, nCheckHeight, nRadioHeight, nMaxCheckWidth );
long nCtrlHeight = (pEntry->mnBits & MIB_RADIOCHECK) ? nCheckHeight : nRadioHeight;
- nMaxTextWidth += nCtrlHeight + 1;
+ nMaxTextWidth += nCtrlHeight + gfxExtra;
}
else if( pEntry->mbChecked )
{
@@ -1516,7 +1517,7 @@ void ToolbarMenu::implPaint( ToolbarMenuEntry* pThisOnly, bool bHighlighted )
Rectangle aCheckRect( aTmpPos, Size( nCtrlHeight, nCtrlHeight ) );
DrawNativeControl( CTRL_MENU_POPUP, nPart, aCheckRect, nState, ImplControlValue(), OUString() );
- aPos.setX( aPos.getX() + nCtrlHeight + 1 );
+ aPos.setX( aPos.getX() + nCtrlHeight + gfxExtra );
}
else if ( pEntry->mbChecked ) // by default do nothing for unchecked items
{
@@ -1538,7 +1539,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 );
+ aPos.setX( aPos.getX() + aSymbolSize.getWidth( ) + gfxExtra );
}
}
}
More information about the Libreoffice-commits
mailing list