summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2016-09-30 23:19:48 +0200
committerJan-Marek Glogowski <glogow@fbihome.de>2016-12-20 14:19:15 +0100
commit97b2970d09af2c94698b25b9e7f0d47fcc7d4f74 (patch)
tree177c35c43afd5e83dd2949118fb46b745a7a7cc0 /vcl
parent84979c4ca6ee6ae67b095c29ffb5b44f6fb77f75 (diff)
Fix variable scope and better code readability
Change-Id: Icce8bc0c1031ad0d1b53fa7389e1a75f16e62972
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/window/toolbox.cxx6
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);