include/vcl/settings.hxx | 4 ++++ sc/source/ui/unoobj/editsrc.cxx | 2 +- vcl/headless/svpframe.cxx | 8 +++++++- vcl/osx/salframe.cxx | 7 +++---- vcl/source/app/settings.cxx | 13 +++++++++++++ vcl/unx/gtk/salnativewidgets-gtk.cxx | 7 ++----- vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx | 6 +----- vcl/unx/kde4/KDESalFrame.cxx | 11 ++++------- vcl/unx/kde5/KDE5SalFrame.cxx | 11 ++++------- vcl/win/window/salframe.cxx | 2 ++ 10 files changed, 41 insertions(+), 30 deletions(-)
New commits: commit eaa7f27ca89d4048934baff6b2c3e1b9d6a5b1a4 Author: Jens Carl <j.car...@gmx.de> Date: Fri Nov 10 07:02:58 2017 +0000 tdf#39468 Translate German comment Change-Id: I6cf6f1775fc47014185607433ab0e5cc1a2761d6 Reviewed-on: https://gerrit.libreoffice.org/44571 Reviewed-by: Eike Rathke <er...@redhat.com> Tested-by: Eike Rathke <er...@redhat.com> diff --git a/sc/source/ui/unoobj/editsrc.cxx b/sc/source/ui/unoobj/editsrc.cxx index 2e3629b04ec5..a333bcde08df 100644 --- a/sc/source/ui/unoobj/editsrc.cxx +++ b/sc/source/ui/unoobj/editsrc.cxx @@ -164,7 +164,7 @@ SvxTextForwarder* ScAnnotationEditSource::GetTextForwarder() if ( pDocShell ) if ( ScPostIt* pNote = pDocShell->GetDocument().GetNote(aCellPos) ) if ( const EditTextObject* pEditObj = pNote->GetEditTextObject() ) - pEditEngine->SetText( *pEditObj ); // incl. Umbrueche + pEditEngine->SetText( *pEditObj ); // incl. breaks (line, etc.) bDataValid = true; return pForwarder; commit b77af2396adbab0ec4fea4160e0c711b080fff67 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/44624 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Michael Meeks <michael.me...@collabora.com> diff --git a/include/vcl/settings.hxx b/include/vcl/settings.hxx index 097605e7c251..97d5d8265b99 100644 --- a/include/vcl/settings.hxx +++ b/include/vcl/settings.hxx @@ -607,6 +607,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 9ab4d8889c6b..b08c96f06cc7 100644 --- a/vcl/headless/svpframe.cxx +++ b/vcl/headless/svpframe.cxx @@ -404,8 +404,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/osx/salframe.cxx b/vcl/osx/salframe.cxx index 476ef9ab3bad..2d47dd5e8670 100644 --- a/vcl/osx/salframe.cxx +++ b/vcl/osx/salframe.cxx @@ -1148,14 +1148,13 @@ void AquaSalFrame::UpdateSettings( AllSettings& rSettings ) // Background Color Color aBackgroundColor( 0xEC, 0xEC, 0xEC ); - aStyleSettings.Set3DColors( aBackgroundColor ); - aStyleSettings.SetFaceColor( aBackgroundColor ); + aStyleSettings.BatchSetBackgrounds( aBackgroundColor, false ); + aStyleSettings.SetLightBorderColor( aBackgroundColor ); + Color aInactiveTabColor( aBackgroundColor ); aInactiveTabColor.DecreaseLuminance( 32 ); aStyleSettings.SetInactiveTabColor( aInactiveTabColor ); - aStyleSettings.SetDialogColor( aBackgroundColor ); - aStyleSettings.SetLightBorderColor( aBackgroundColor ); Color aShadowColor( aStyleSettings.GetShadowColor() ); aShadowColor.IncreaseLuminance( 32 ); aStyleSettings.SetShadowColor( aShadowColor ); diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx index 215d8eaca122..9d739341176f 100644 --- a/vcl/source/app/settings.cxx +++ b/vcl/source/app/settings.cxx @@ -3117,4 +3117,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: */ diff --git a/vcl/unx/gtk/salnativewidgets-gtk.cxx b/vcl/unx/gtk/salnativewidgets-gtk.cxx index 5126034ed5e5..2973feaa2a54 100644 --- a/vcl/unx/gtk/salnativewidgets-gtk.cxx +++ b/vcl/unx/gtk/salnativewidgets-gtk.cxx @@ -3826,13 +3826,10 @@ void GtkSalGraphics::updateSettings( AllSettings& rSettings ) // background colors Color aBackColor = getColor( pStyle->bg[GTK_STATE_NORMAL] ); Color aBackFieldColor = getColor( pStyle->base[GTK_STATE_NORMAL] ); - aStyleSet.Set3DColors( aBackColor ); - aStyleSet.SetFaceColor( aBackColor ); - aStyleSet.SetDialogColor( aBackColor ); - aStyleSet.SetWorkspaceColor( aBackColor ); + aStyleSet.BatchSetBackgrounds( aBackColor ); + aStyleSet.SetFieldColor( aBackFieldColor ); aStyleSet.SetWindowColor( aBackFieldColor ); - aStyleSet.SetCheckedColorSpecialCase( ); // Dark shadow color Color aDarkShadowColor = getColor( pStyle->fg[GTK_STATE_INSENSITIVE] ); diff --git a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx index 678bf4efdf90..9229b4e178dc 100644 --- a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx +++ b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx @@ -2878,11 +2878,7 @@ void GtkSalGraphics::updateSettings( AllSettings& rSettings ) gtk_style_context_get_background_color(pStyle, gtk_style_context_get_state(pStyle), &background_color); ::Color aBackColor = getColor( background_color ); - aStyleSet.Set3DColors( aBackColor ); - aStyleSet.SetFaceColor( aBackColor ); - aStyleSet.SetDialogColor( aBackColor ); - aStyleSet.SetWorkspaceColor( aBackColor ); - aStyleSet.SetCheckedColorSpecialCase( ); + aStyleSet.BatchSetBackgrounds( aBackColor ); // UI font vcl::Font aFont(getFont(pStyle, rSettings.GetUILanguageTag().getLocale())); diff --git a/vcl/unx/kde4/KDESalFrame.cxx b/vcl/unx/kde4/KDESalFrame.cxx index 97f0fabf4c62..ea46d6e5c247 100644 --- a/vcl/unx/kde4/KDESalFrame.cxx +++ b/vcl/unx/kde4/KDESalFrame.cxx @@ -254,15 +254,12 @@ void KDESalFrame::UpdateSettings( AllSettings& rSettings ) // Disable color style.SetDisableColor( toColor( pal.color( QPalette::Disabled, QPalette::WindowText ) ) ); - // Workspace - style.SetWorkspaceColor( aMid ); - // Background - style.Set3DColors( aBack ); - style.SetFaceColor( aBack ); + style.BatchSetBackgrounds( aBack ); style.SetInactiveTabColor( aBack ); - style.SetDialogColor( aBack ); - style.SetCheckedColorSpecialCase( ); + + // Workspace + style.SetWorkspaceColor( aMid ); // Selection style.SetHighlightColor( aHigh ); diff --git a/vcl/unx/kde5/KDE5SalFrame.cxx b/vcl/unx/kde5/KDE5SalFrame.cxx index 5a15b6fb2592..1222260702ef 100644 --- a/vcl/unx/kde5/KDE5SalFrame.cxx +++ b/vcl/unx/kde5/KDE5SalFrame.cxx @@ -240,15 +240,12 @@ void KDE5SalFrame::UpdateSettings( AllSettings& rSettings ) // Disable color style.SetDisableColor( toColor( pal.color( QPalette::Disabled, QPalette::WindowText ) ) ); - // Workspace - style.SetWorkspaceColor( aMid ); - // Background - style.Set3DColors( aBack ); - style.SetFaceColor( aBack ); + style.BatchSetBackgrounds( aBack ); style.SetInactiveTabColor( aBack ); - style.SetDialogColor( aBack ); - style.SetCheckedColorSpecialCase( ); + + // Workspace + style.SetWorkspaceColor( aMid ); // Selection style.SetHighlightColor( aHigh ); diff --git a/vcl/win/window/salframe.cxx b/vcl/win/window/salframe.cxx index dcbfda8163a8..725b02e0f232 100644 --- a/vcl/win/window/salframe.cxx +++ b/vcl/win/window/salframe.cxx @@ -2636,7 +2636,9 @@ void WinSalFrame::UpdateSettings( AllSettings& rSettings ) aStyleSettings.SetDarkShadowColor( ImplWinColorToSal( GetSysColor( COLOR_3DDKSHADOW ) ) ); aStyleSettings.SetHelpColor( ImplWinColorToSal( GetSysColor( COLOR_INFOBK ) ) ); aStyleSettings.SetHelpTextColor( ImplWinColorToSal( GetSysColor( COLOR_INFOTEXT ) ) ); + aStyleSettings.SetDialogColor( aStyleSettings.GetFaceColor() ); + aStyleSettings.SetDialogTextColor( aStyleSettings.GetButtonTextColor() ); aStyleSettings.SetButtonTextColor( ImplWinColorToSal( GetSysColor( COLOR_BTNTEXT ) ) ); aStyleSettings.SetButtonRolloverTextColor( aStyleSettings.GetButtonTextColor() ); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits