diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2015-05-18 11:18:49 +0900 |
---|---|---|
committer | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2015-05-18 11:22:50 +0900 |
commit | 6656e915c8e0348dcaeedb40a68ba308e174960b (patch) | |
tree | 26d1b1d9d75ebee8b14d1082928b7abf4894b821 /vcl/source/window | |
parent | 6fa87f3fde8316fe1e4c35d1dd5132dbd7d7d903 (diff) |
ApplySettings for dialog
Change-Id: I30f26799e0dfa059ad754eead5ba382f44bf1310
Diffstat (limited to 'vcl/source/window')
-rw-r--r-- | vcl/source/window/dialog.cxx | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx index 4aa3e15f08cc..93273a79a890 100644 --- a/vcl/source/window/dialog.cxx +++ b/vcl/source/window/dialog.cxx @@ -432,20 +432,40 @@ void Dialog::ImplInit( vcl::Window* pParent, WinBits nStyle, InitFlag eFlag ) ImplInitSettings(); } +void Dialog::ApplySettings(vcl::RenderContext& rRenderContext) +{ + if (IsControlBackground()) + { + // user override + SetBackground(GetControlBackground()); + } + else if (rRenderContext.IsNativeControlSupported(CTRL_WINDOW_BACKGROUND, PART_BACKGROUND_DIALOG)) + { + // NWF background + mpWindowImpl->mnNativeBackground = PART_BACKGROUND_DIALOG; + EnableChildTransparentMode(true); + } + else + { + // fallback to settings color + rRenderContext.SetBackground(GetSettings().GetStyleSettings().GetDialogColor()); + } +} + void Dialog::ImplInitSettings() { // user override - if ( IsControlBackground() ) - SetBackground( GetControlBackground() ); + if (IsControlBackground()) + SetBackground(GetControlBackground()); // NWF background - else if( IsNativeControlSupported( CTRL_WINDOW_BACKGROUND, PART_BACKGROUND_DIALOG ) ) + else if( IsNativeControlSupported(CTRL_WINDOW_BACKGROUND, PART_BACKGROUND_DIALOG)) { mpWindowImpl->mnNativeBackground = PART_BACKGROUND_DIALOG; EnableChildTransparentMode( true ); } // fallback to settings color else - SetBackground( GetSettings().GetStyleSettings().GetDialogColor() ); + SetBackground(GetSettings().GetStyleSettings().GetDialogColor()); } Dialog::Dialog( WindowType nType ) |