summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@suse.cz>2011-10-10 00:40:04 +0200
committerJan Holesovsky <kendy@suse.cz>2011-10-10 00:40:04 +0200
commit225b8d6bbf3516725b11120e4fa8d0a21a6a8647 (patch)
tree4b09fd1243a5ff8cb424498b62f05ab1e00a8241 /vcl
parent16f5c269890156395644caa5f557570c1c65ca50 (diff)
Simplify drawing of the toolbar indicator.
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/window/toolbox.cxx41
1 files changed, 1 insertions, 40 deletions
diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index f458fdcae78a..7361f8ad2306 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -3142,53 +3142,14 @@ void ToolBox::ImplDrawMenubutton( ToolBox *pThis, sal_Bool bHighlight )
Color aOldFillCol = pThis->GetFillColor();
Color aOldLineCol = pThis->GetLineColor();
- Rectangle aInnerRect( pThis->mpData->maMenubuttonItem.maRect );
- if( pThis->mpData->mnMenuButtonWidth > TB_MENUBUTTON_SIZE )
- {
- long nDiff = pThis->mpData->mnMenuButtonWidth - TB_MENUBUTTON_SIZE;
- long nDiff1 = nDiff/2;
- long nDiff2 = nDiff - nDiff1;
- if( pThis->IsHorizontal() )
- {
- aInnerRect.Left() += nDiff1;
- aInnerRect.Right() -= nDiff2;
- }
- else
- {
- aInnerRect.Top() += nDiff1;
- aInnerRect.Bottom() -= nDiff2;
- }
- }
-
- if( pThis->IsHorizontal() )
- {
- aInnerRect.nLeft+=2;
- aInnerRect.nRight-=1;
- aInnerRect.nTop+=1;
- aInnerRect.nBottom-=1;
- }
- else
- {
- aInnerRect.nLeft+=1;
- aInnerRect.nRight-=1;
- aInnerRect.nTop+=2;
- aInnerRect.nBottom-=1;
- }
-
// draw the 'more' indicator / button (>>)
ImplErase( pThis, pThis->mpData->maMenubuttonItem.maRect, bHighlight );
if( bHighlight )
ImplDrawButton( pThis, pThis->mpData->maMenubuttonItem.maRect, 2, sal_False, sal_True, sal_False );
- Rectangle aRect( aInnerRect );
- if( pThis->mbHorz )
- aRect.Top() = aRect.Bottom() - aRect.getHeight()/3;
- else
- aRect.Left() = aRect.Right() - aRect.getWidth()/3;
-
if( pThis->ImplHasClippedItems() )
- ImplDrawMoreIndicator( pThis, aInnerRect, sal_True, !pThis->mbHorz );
+ ImplDrawMoreIndicator( pThis, pThis->mpData->maMenubuttonItem.maRect, sal_True, !pThis->mbHorz );
// store highlight state
pThis->mpData->mbMenubuttonSelected = bHighlight;