diff options
-rw-r--r-- | vcl/source/control/fixed.cxx | 21 | ||||
-rw-r--r-- | vcl/source/window/toolbox.cxx | 2 |
2 files changed, 15 insertions, 8 deletions
diff --git a/vcl/source/control/fixed.cxx b/vcl/source/control/fixed.cxx index a38f2e7a6506..d417f97ece07 100644 --- a/vcl/source/control/fixed.cxx +++ b/vcl/source/control/fixed.cxx @@ -183,14 +183,8 @@ void FixedText::ApplySettings(vcl::RenderContext& rRenderContext) Control::ApplySettings(rRenderContext); vcl::Window* pParent = GetParent(); - if (pParent->IsChildTransparentModeEnabled() && !IsControlBackground()) - { - EnableChildTransparentMode(); - SetParentClipMode(ParentClipMode::NoClip); - SetPaintTransparent(true); - rRenderContext.SetBackground(); - } - else + bool bEnableTransparent = true; + if (!pParent->IsChildTransparentModeEnabled() || IsControlBackground()) { EnableChildTransparentMode(false); SetParentClipMode(); @@ -200,6 +194,17 @@ void FixedText::ApplySettings(vcl::RenderContext& rRenderContext) rRenderContext.SetBackground(GetControlBackground()); else rRenderContext.SetBackground(pParent->GetBackground()); + + if (rRenderContext.IsBackground()) + bEnableTransparent = false; + } + + if (bEnableTransparent) + { + EnableChildTransparentMode(); + SetParentClipMode(ParentClipMode::NoClip); + SetPaintTransparent(true); + rRenderContext.SetBackground(); } } diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx index 111c8759cd03..a2b1400507ce 100644 --- a/vcl/source/window/toolbox.cxx +++ b/vcl/source/window/toolbox.cxx @@ -1292,6 +1292,8 @@ void ToolBox::ImplInitSettings(bool bFont, bool bForeground, bool bBackground) SetParentClipMode(); } } + + EnableChildTransparentMode(IsPaintTransparent()); } } |