summaryrefslogtreecommitdiff
path: root/vcl/source/app/settings.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source/app/settings.cxx')
-rw-r--r--vcl/source/app/settings.cxx11
1 files changed, 4 insertions, 7 deletions
diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx
index 71d58a4aa5a8..4803fab81ce4 100644
--- a/vcl/source/app/settings.cxx
+++ b/vcl/source/app/settings.cxx
@@ -2274,13 +2274,10 @@ void StyleSettings::Set3DColors( const Color& rColor )
mxData->maDarkShadowColor.IncreaseLuminance(100);
}
- sal_uLong nRed = mxData->maLightColor.GetRed();
- sal_uLong nGreen = mxData->maLightColor.GetGreen();
- sal_uLong nBlue = mxData->maLightColor.GetBlue();
- nRed += static_cast<sal_uLong>(mxData->maShadowColor.GetRed());
- nGreen += static_cast<sal_uLong>(mxData->maShadowColor.GetGreen());
- nBlue += static_cast<sal_uLong>(mxData->maShadowColor.GetBlue());
- mxData->maCheckedColor = Color( static_cast<sal_uInt8>(nRed/2), static_cast<sal_uInt8>(nGreen/2), static_cast<sal_uInt8>(nBlue/2) );
+ sal_uInt8 nRed = (mxData->maLightColor.GetRed() + mxData->maShadowColor.GetRed()) / 2;
+ sal_uInt8 nGreen = (mxData->maLightColor.GetGreen() + mxData->maShadowColor.GetGreen()) / 2;
+ sal_uInt8 nBlue = (mxData->maLightColor.GetBlue() + mxData->maShadowColor.GetBlue()) / 2;
+ mxData->maCheckedColor = Color(nRed, nGreen, nBlue);
}
else
{