diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-08-04 09:22:10 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-08-04 11:21:22 +0200 |
commit | f45ff1a7147e6a9479c669f082dd74349c6bcb4b (patch) | |
tree | 9ec5eee03fe7bbc5e026318efd6dcca3502d4696 /vcl/source/toolkit | |
parent | 58937aa4a50ecd681382f03331340da4c843b01e (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/toolkit')
-rw-r--r-- | vcl/source/toolkit/group.cxx | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/vcl/source/toolkit/group.cxx b/vcl/source/toolkit/group.cxx index ef7b28794e48..a1178eca2b32 100644 --- a/vcl/source/toolkit/group.cxx +++ b/vcl/source/toolkit/group.cxx @@ -57,29 +57,29 @@ void GroupBox::ImplInitSettings( bool bBackground ) { Control::ImplInitSettings(); - if ( bBackground ) + if ( !bBackground ) + return; + + vcl::Window* pParent = GetParent(); + if ( (pParent->IsChildTransparentModeEnabled() || + !(pParent->GetStyle() & WB_CLIPCHILDREN) ) && + !IsControlBackground() ) { - vcl::Window* pParent = GetParent(); - if ( (pParent->IsChildTransparentModeEnabled() || - !(pParent->GetStyle() & WB_CLIPCHILDREN) ) && - !IsControlBackground() ) - { - EnableChildTransparentMode(); - SetParentClipMode( ParentClipMode::NoClip ); - SetPaintTransparent( true ); - SetBackground(); - } - else - { - EnableChildTransparentMode( false ); - SetParentClipMode(); - SetPaintTransparent( false ); + EnableChildTransparentMode(); + SetParentClipMode( ParentClipMode::NoClip ); + SetPaintTransparent( true ); + SetBackground(); + } + else + { + EnableChildTransparentMode( false ); + SetParentClipMode(); + SetPaintTransparent( false ); - if ( IsControlBackground() ) - SetBackground( GetControlBackground() ); - else - SetBackground( pParent->GetBackground() ); - } + if ( IsControlBackground() ) + SetBackground( GetControlBackground() ); + else + SetBackground( pParent->GetBackground() ); } } |