include/vcl/settings.hxx | 4 ++++ vcl/headless/svpframe.cxx | 8 +++++++- vcl/source/app/settings.cxx | 13 +++++++++++++ 3 files changed, 24 insertions(+), 1 deletion(-)
New commits: commit 07ee9335d0be1a2bfe2d39bd5b9fd3fef715e3dd Author: Michael Meeks <michael.me...@collabora.com> Date: Fri Nov 10 17:57:19 2017 +0000 vcl: StyleSettings - start to unwind code duplication. This should be a pure re-factor, plus headless tweak. Change-Id: Iad7f524ea76625601b3f85cc13a50311ed1de171 Reviewed-on: https://gerrit.libreoffice.org/44811 Reviewed-by: Jan Holesovsky <ke...@collabora.com> Tested-by: Jan Holesovsky <ke...@collabora.com> diff --git a/include/vcl/settings.hxx b/include/vcl/settings.hxx index e8b7c0a6f28a..ffa39ad7c1c5 100644 --- a/include/vcl/settings.hxx +++ b/include/vcl/settings.hxx @@ -605,6 +605,10 @@ public: bool operator ==( const StyleSettings& rSet ) const; bool operator !=( const StyleSettings& rSet ) const; + + // Batch setters used by various backends + void BatchSetBackgrounds( const Color &aBackColor, + bool bCheckedColorSpecialCase = true); }; diff --git a/vcl/headless/svpframe.cxx b/vcl/headless/svpframe.cxx index 0ce76cf119d1..6db9d3b2e350 100644 --- a/vcl/headless/svpframe.cxx +++ b/vcl/headless/svpframe.cxx @@ -409,8 +409,14 @@ LanguageType SvpSalFrame::GetInputLanguage() return LANGUAGE_DONTKNOW; } -void SvpSalFrame::UpdateSettings( AllSettings& ) +void SvpSalFrame::UpdateSettings( AllSettings& rSettings ) { + StyleSettings aStyleSettings = rSettings.GetStyleSettings(); + + Color aBackgroundColor( 0xec, 0xec, 0xec ); + aStyleSettings.BatchSetBackgrounds( aBackgroundColor, false ); + + rSettings.SetStyleSettings( aStyleSettings ); } void SvpSalFrame::Beep() diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx index e4d90f91e253..69848d3f530c 100644 --- a/vcl/source/app/settings.cxx +++ b/vcl/source/app/settings.cxx @@ -3112,4 +3112,17 @@ AllSettings::GetSysLocale() return mxData->maSysLocale; } + +void StyleSettings::BatchSetBackgrounds( const Color &aBackColor, + bool bCheckedColorSpecialCase ) +{ + Set3DColors( aBackColor ); + SetFaceColor( aBackColor ); + SetDialogColor( aBackColor ); + SetWorkspaceColor( aBackColor ); + + if (bCheckedColorSpecialCase) + SetCheckedColorSpecialCase(); +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits