summaryrefslogtreecommitdiff
path: root/vcl/source/control/prgsbar.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-08-04 09:22:10 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-08-04 11:21:22 +0200
commitf45ff1a7147e6a9479c669f082dd74349c6bcb4b (patch)
tree9ec5eee03fe7bbc5e026318efd6dcca3502d4696 /vcl/source/control/prgsbar.cxx
parent58937aa4a50ecd681382f03331340da4c843b01e (diff)
loplugin:flatten in vcl
Change-Id: I271cc67ecf34acbf0edbda960e33315fb6a1f9dc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100041 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/source/control/prgsbar.cxx')
-rw-r--r--vcl/source/control/prgsbar.cxx32
1 files changed, 16 insertions, 16 deletions
diff --git a/vcl/source/control/prgsbar.cxx b/vcl/source/control/prgsbar.cxx
index 7082042df261..0f61ea90b496 100644
--- a/vcl/source/control/prgsbar.cxx
+++ b/vcl/source/control/prgsbar.cxx
@@ -92,25 +92,25 @@ void ProgressBar::ImplInitSettings( bool bFont,
}
}
- if ( bForeground || bFont )
+ if ( !(bForeground || bFont) )
+ return;
+
+ Color aColor = rStyleSettings.GetHighlightColor();
+ if ( IsControlForeground() )
+ aColor = GetControlForeground();
+ if ( aColor.IsRGBEqual( GetBackground().GetColor() ) )
{
- Color aColor = rStyleSettings.GetHighlightColor();
- if ( IsControlForeground() )
- aColor = GetControlForeground();
- if ( aColor.IsRGBEqual( GetBackground().GetColor() ) )
- {
- if ( aColor.GetLuminance() > 100 )
- aColor.DecreaseLuminance( 64 );
- else
- aColor.IncreaseLuminance( 64 );
- }
- SetLineColor();
- SetFillColor( aColor );
+ if ( aColor.GetLuminance() > 100 )
+ aColor.DecreaseLuminance( 64 );
+ else
+ aColor.IncreaseLuminance( 64 );
+ }
+ SetLineColor();
+ SetFillColor( aColor );
/* FIXME: !!! We do not support text output at the moment
- SetTextColor( aColor );
- SetTextFillColor();
+ SetTextColor( aColor );
+ SetTextFillColor();
*/
- }
}
void ProgressBar::ImplDrawProgress(vcl::RenderContext& rRenderContext, sal_uInt16 nNewPerc)