diff options
author | Jan-Marek Glogowski <glogow@fbihome.de> | 2016-09-30 23:19:48 +0200 |
---|---|---|
committer | Jan-Marek Glogowski <glogow@fbihome.de> | 2016-12-20 14:19:15 +0100 |
commit | 97b2970d09af2c94698b25b9e7f0d47fcc7d4f74 (patch) | |
tree | 177c35c43afd5e83dd2949118fb46b745a7a7cc0 /vcl | |
parent | 84979c4ca6ee6ae67b095c29ffb5b44f6fb77f75 (diff) |
Fix variable scope and better code readability
Change-Id: Icce8bc0c1031ad0d1b53fa7389e1a75f16e62972
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/window/toolbox.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx index 3dedc787ad53..b1238d2a0c86 100644 --- a/vcl/source/window/toolbox.cxx +++ b/vcl/source/window/toolbox.cxx @@ -533,12 +533,12 @@ void ToolBox::ImplDrawBackground(vcl::RenderContext& rRenderContext, const Recta bool bNativeOk = false; if( ImplIsFloatingMode() && rRenderContext.IsNativeControlSupported( ControlType::Toolbar, ControlPart::Entire) ) bNativeOk = ImplDrawNativeBackground(rRenderContext, aPaintRegion); - const StyleSettings rSetting = Application::GetSettings().GetStyleSettings(); if (!bNativeOk) { + const StyleSettings rSetting = Application::GetSettings().GetStyleSettings(); + const bool isHeader = GetAlign() == WindowAlign::Top && !rSetting.GetPersonaHeader().IsEmpty(); const bool isFooter = GetAlign() == WindowAlign::Bottom && !rSetting.GetPersonaFooter().IsEmpty(); - if (!IsBackground() || - ((GetAlign() == WindowAlign::Top && !rSetting.GetPersonaHeader().IsEmpty() ) || isFooter)) + if (!IsBackground() || isHeader || isFooter) { if (!IsInPaint()) ImplDrawTransparentBackground(rRenderContext, aPaintRegion); |