summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-02-11 13:24:47 +0000
committerCaolán McNamara <caolanm@redhat.com>2011-02-11 13:24:47 +0000
commite4840966c61a4e23e4948d67373da70fd770f5cd (patch)
tree2673a585171b4e402125a76ad5c8c7a7c6a84124 /svtools
parent0b8f11ce95d81b63e6d6a3f34b05a4e99147c6ad (diff)
try and use the same spacing between checkboxes and text as vcl does
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/control/toolbarmenu.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/svtools/source/control/toolbarmenu.cxx b/svtools/source/control/toolbarmenu.cxx
index f0f7c3e20e84..a24673fe4bb5 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 );
}
}
}