fix old indent
Change-Id: I05781f34ed22801ac2d99629a0914c069201a918
This commit is contained in:
@@ -2084,91 +2084,91 @@ void RadioButton::ImplDrawRadioButtonState()
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( bNativeOK == sal_False )
|
if ( bNativeOK == sal_False )
|
||||||
{
|
|
||||||
// kein Image-RadioButton
|
|
||||||
if ( !maImage )
|
|
||||||
{
|
{
|
||||||
sal_uInt16 nStyle = ImplGetButtonState();
|
// kein Image-RadioButton
|
||||||
if ( !IsEnabled() )
|
if ( !maImage )
|
||||||
nStyle |= BUTTON_DRAW_DISABLED;
|
|
||||||
if ( mbChecked )
|
|
||||||
nStyle |= BUTTON_DRAW_CHECKED;
|
|
||||||
Image aImage = GetRadioImage( GetSettings(), nStyle );
|
|
||||||
if ( IsZoom() )
|
|
||||||
DrawImage( maStateRect.TopLeft(), maStateRect.GetSize(), aImage );
|
|
||||||
else
|
|
||||||
DrawImage( maStateRect.TopLeft(), aImage );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
HideFocus();
|
|
||||||
|
|
||||||
DecorationView aDecoView( this );
|
|
||||||
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
|
|
||||||
Rectangle aImageRect = maStateRect;
|
|
||||||
Size aImageSize = maImage.GetSizePixel();
|
|
||||||
sal_Bool bEnabled = IsEnabled();
|
|
||||||
sal_uInt16 nButtonStyle = FRAME_DRAW_DOUBLEIN;
|
|
||||||
|
|
||||||
aImageSize.Width() = CalcZoom( aImageSize.Width() );
|
|
||||||
aImageSize.Height() = CalcZoom( aImageSize.Height() );
|
|
||||||
|
|
||||||
// display border and selection status
|
|
||||||
aImageRect = aDecoView.DrawFrame( aImageRect, nButtonStyle );
|
|
||||||
if ( (ImplGetButtonState() & BUTTON_DRAW_PRESSED) || !bEnabled )
|
|
||||||
SetFillColor( rStyleSettings.GetFaceColor() );
|
|
||||||
else
|
|
||||||
SetFillColor( rStyleSettings.GetFieldColor() );
|
|
||||||
SetLineColor();
|
|
||||||
DrawRect( aImageRect );
|
|
||||||
|
|
||||||
// display image
|
|
||||||
nButtonStyle = 0;
|
|
||||||
if ( !bEnabled )
|
|
||||||
nButtonStyle |= IMAGE_DRAW_DISABLE;
|
|
||||||
|
|
||||||
Image *pImage = &maImage;
|
|
||||||
|
|
||||||
Point aImagePos( aImageRect.TopLeft() );
|
|
||||||
aImagePos.X() += (aImageRect.GetWidth()-aImageSize.Width())/2;
|
|
||||||
aImagePos.Y() += (aImageRect.GetHeight()-aImageSize.Height())/2;
|
|
||||||
if ( IsZoom() )
|
|
||||||
DrawImage( aImagePos, aImageSize, *pImage, nButtonStyle );
|
|
||||||
else
|
|
||||||
DrawImage( aImagePos, *pImage, nButtonStyle );
|
|
||||||
|
|
||||||
aImageRect.Left()++;
|
|
||||||
aImageRect.Top()++;
|
|
||||||
aImageRect.Right()--;
|
|
||||||
aImageRect.Bottom()--;
|
|
||||||
|
|
||||||
ImplSetFocusRect( aImageRect );
|
|
||||||
|
|
||||||
if ( mbChecked )
|
|
||||||
{
|
{
|
||||||
SetLineColor( rStyleSettings.GetHighlightColor() );
|
sal_uInt16 nStyle = ImplGetButtonState();
|
||||||
SetFillColor();
|
if ( !IsEnabled() )
|
||||||
if ( (aImageSize.Width() >= 20) || (aImageSize.Height() >= 20) )
|
nStyle |= BUTTON_DRAW_DISABLED;
|
||||||
{
|
if ( mbChecked )
|
||||||
aImageRect.Left()++;
|
nStyle |= BUTTON_DRAW_CHECKED;
|
||||||
aImageRect.Top()++;
|
Image aImage = GetRadioImage( GetSettings(), nStyle );
|
||||||
aImageRect.Right()--;
|
if ( IsZoom() )
|
||||||
aImageRect.Bottom()--;
|
DrawImage( maStateRect.TopLeft(), maStateRect.GetSize(), aImage );
|
||||||
}
|
else
|
||||||
|
DrawImage( maStateRect.TopLeft(), aImage );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
HideFocus();
|
||||||
|
|
||||||
|
DecorationView aDecoView( this );
|
||||||
|
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
|
||||||
|
Rectangle aImageRect = maStateRect;
|
||||||
|
Size aImageSize = maImage.GetSizePixel();
|
||||||
|
sal_Bool bEnabled = IsEnabled();
|
||||||
|
sal_uInt16 nButtonStyle = FRAME_DRAW_DOUBLEIN;
|
||||||
|
|
||||||
|
aImageSize.Width() = CalcZoom( aImageSize.Width() );
|
||||||
|
aImageSize.Height() = CalcZoom( aImageSize.Height() );
|
||||||
|
|
||||||
|
// display border and selection status
|
||||||
|
aImageRect = aDecoView.DrawFrame( aImageRect, nButtonStyle );
|
||||||
|
if ( (ImplGetButtonState() & BUTTON_DRAW_PRESSED) || !bEnabled )
|
||||||
|
SetFillColor( rStyleSettings.GetFaceColor() );
|
||||||
|
else
|
||||||
|
SetFillColor( rStyleSettings.GetFieldColor() );
|
||||||
|
SetLineColor();
|
||||||
DrawRect( aImageRect );
|
DrawRect( aImageRect );
|
||||||
|
|
||||||
|
// display image
|
||||||
|
nButtonStyle = 0;
|
||||||
|
if ( !bEnabled )
|
||||||
|
nButtonStyle |= IMAGE_DRAW_DISABLE;
|
||||||
|
|
||||||
|
Image *pImage = &maImage;
|
||||||
|
|
||||||
|
Point aImagePos( aImageRect.TopLeft() );
|
||||||
|
aImagePos.X() += (aImageRect.GetWidth()-aImageSize.Width())/2;
|
||||||
|
aImagePos.Y() += (aImageRect.GetHeight()-aImageSize.Height())/2;
|
||||||
|
if ( IsZoom() )
|
||||||
|
DrawImage( aImagePos, aImageSize, *pImage, nButtonStyle );
|
||||||
|
else
|
||||||
|
DrawImage( aImagePos, *pImage, nButtonStyle );
|
||||||
|
|
||||||
aImageRect.Left()++;
|
aImageRect.Left()++;
|
||||||
aImageRect.Top()++;
|
aImageRect.Top()++;
|
||||||
aImageRect.Right()--;
|
aImageRect.Right()--;
|
||||||
aImageRect.Bottom()--;
|
aImageRect.Bottom()--;
|
||||||
DrawRect( aImageRect );
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( HasFocus() )
|
ImplSetFocusRect( aImageRect );
|
||||||
ShowFocus( ImplGetFocusRect() );
|
|
||||||
|
if ( mbChecked )
|
||||||
|
{
|
||||||
|
SetLineColor( rStyleSettings.GetHighlightColor() );
|
||||||
|
SetFillColor();
|
||||||
|
if ( (aImageSize.Width() >= 20) || (aImageSize.Height() >= 20) )
|
||||||
|
{
|
||||||
|
aImageRect.Left()++;
|
||||||
|
aImageRect.Top()++;
|
||||||
|
aImageRect.Right()--;
|
||||||
|
aImageRect.Bottom()--;
|
||||||
|
}
|
||||||
|
DrawRect( aImageRect );
|
||||||
|
aImageRect.Left()++;
|
||||||
|
aImageRect.Top()++;
|
||||||
|
aImageRect.Right()--;
|
||||||
|
aImageRect.Bottom()--;
|
||||||
|
DrawRect( aImageRect );
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( HasFocus() )
|
||||||
|
ShowFocus( ImplGetFocusRect() );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// -----------------------------------------------------------------------
|
// -----------------------------------------------------------------------
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user