diff options
author | Joel Madero <jmadero.dev@gmail.com> | 2012-07-24 23:49:54 -0700 |
---|---|---|
committer | Ivan Timofeev <timofeev.i.s@gmail.com> | 2012-07-25 21:13:38 +0400 |
commit | ad9ca11b6fa7792880571d33750c9f52568b837e (patch) | |
tree | ac43fc70fddb4abb172e9dbd785fe06c6afcd134 /vcl | |
parent | 101baf42f931344e4a8330e4c512dc7a4f2fe8a9 (diff) |
fdo#47164: Increased size of hotspot box for recent documents on Start Center
Prior to patch hotspot and arrow symbol were being controlled by same
rectangle feature. In order to increase hotspot area but leave arrow at
the same size it was necessary to separate the two, creating a second
rectangle to control hotspot size. New rectangle named bInRect, similarly
bSize had to be created.
Change-Id: Iec27d45e1f538dc0185861be7a988b0851fbb352
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/control/button.cxx | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx index 3dd6097465f7..2944abc8f58f 100644 --- a/vcl/source/control/button.cxx +++ b/vcl/source/control/button.cxx @@ -825,6 +825,7 @@ void PushButton::ImplDrawPushButtonContent( OutputDevice* pDev, sal_uLong nDrawF { const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); Rectangle aInRect = rRect; + Rectangle bInRect = rRect; Color aColor; XubString aText = PushButton::GetText(); // PushButton:: wegen MoreButton sal_uInt16 nTextStyle = ImplGetTextStyle( nDrawFlags ); @@ -853,6 +854,7 @@ void PushButton::ImplDrawPushButtonContent( OutputDevice* pDev, sal_uLong nDrawF nStyle = SYMBOL_DRAW_DISABLE; Size aSize = rRect.GetSize(); + Size bSize = rRect.GetSize(); Point aPos = rRect.TopLeft(); sal_uLong nImageSep = 1 + (pDev->GetTextHeight()-10)/2; @@ -862,14 +864,19 @@ void PushButton::ImplDrawPushButtonContent( OutputDevice* pDev, sal_uLong nDrawF { if ( aText.Len() && ! (ImplGetButtonState() & BUTTON_DRAW_NOTEXT) ) { - // calc Symbol- and Textrect + // calculate symbol size long nSymbolSize = pDev->GetTextHeight() / 2 + 1; - aInRect.Right() -= 5; + aInRect.Right() -= 2; //rectangle width aInRect.Left() = aInRect.Right() - nSymbolSize; - aSize.Width() -= ( 5 + nSymbolSize ); - ImplDrawAlignedImage( pDev, aPos, aSize, bLayout, nImageSep, + //caluclate dimension of recent documents hotspot rectangle + + bInRect.Right() += 10; //rectangle width + bInRect.Left() = bInRect.Right() - 3*nSymbolSize; + bSize.Width() -= ( 5 + nSymbolSize ); + ImplDrawAlignedImage( pDev, aPos, bSize, bLayout, nImageSep, nDrawFlags, nTextStyle, NULL, true ); + } else ImplCalcSymbolRect( aInRect ); @@ -880,15 +887,17 @@ void PushButton::ImplDrawPushButtonContent( OutputDevice* pDev, sal_uLong nDrawF DecorationView aDecoView( pDev ); if( bMenuBtnSep ) { - long nX = aInRect.Left() - 2*nDistance; - Point aStartPt( nX, aInRect.Top()+nDistance ); - Point aEndPt( nX, aInRect.Bottom()-nDistance ); + long nX = bInRect.Left() - 3*nDistance; + Point aStartPt( nX+10, bInRect.Top()+nDistance ); + Point aEndPt( nX, bInRect.Bottom()-nDistance ); aDecoView.DrawSeparator( aStartPt, aEndPt ); } + aDecoView.DrawSymbol( aInRect, SYMBOL_SPIN_DOWN, aColor, nStyle ); - aInRect.Left() -= 2*nDistance; - ImplSetSymbolRect( aInRect ); + bInRect.Left() -= -3*nDistance; + ImplSetSymbolRect( bInRect ); } + } else { |