svtools/source/control/valueset.cxx | 3 ++- vcl/source/window/paint.cxx | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-)
New commits: commit 35132e5cd648fd54ffb186039324f5fb954dd08f Author: Miklos Vajna <vmik...@collabora.com> AuthorDate: Thu Aug 29 18:01:44 2019 +0200 Commit: Miklos Vajna <vmik...@collabora.com> CommitDate: Thu Aug 29 18:44:42 2019 +0200 tdf#127211 start center: fix background of the main area with no recent docs The background was white instead of gray, but the text color remained white, making the text unreadable. This was a problem since commit a5cafe5d7e87c0f5ecdcffbbe58c66abcb97ac8e (tdf#91843 sd sidebar: fix unexpected borders around the slide layout previews, 2019-08-27). Given that the background fix was intended to help with the slide previews in impress, move the change affecting the background handling down to ValueSet and revert the VCL changes. This preserves the impress slide preview fix, but restores the old good behavior for all non-ValueSet widgets, including the start center. Change-Id: I7efcd5b9c12e5df8e10261c992bf7a774960fa11 Reviewed-on: https://gerrit.libreoffice.org/78280 Reviewed-by: Miklos Vajna <vmik...@collabora.com> Tested-by: Jenkins diff --git a/svtools/source/control/valueset.cxx b/svtools/source/control/valueset.cxx index 79e861fca94c..87383a67df9e 100644 --- a/svtools/source/control/valueset.cxx +++ b/svtools/source/control/valueset.cxx @@ -149,7 +149,8 @@ void ValueSet::ApplySettings(vcl::RenderContext& rRenderContext) aColor = rStyleSettings.GetWindowColor(); else aColor = rStyleSettings.GetFaceColor(); - ApplyControlBackground(rRenderContext, aColor); + if (GetBackground().GetColor() == COL_TRANSPARENT) + ApplyControlBackground(rRenderContext, aColor); } void ValueSet::ImplInitSettings(bool bFont, bool bForeground, bool bBackground) diff --git a/vcl/source/window/paint.cxx b/vcl/source/window/paint.cxx index 1804004137c3..d8703a4c5b0f 100644 --- a/vcl/source/window/paint.cxx +++ b/vcl/source/window/paint.cxx @@ -298,8 +298,8 @@ void PaintHelper::DoPaint(const vcl::Region* pRegion) // direct painting Wallpaper aBackground = m_pWindow->GetBackground(); m_pWindow->ApplySettings(*m_pWindow); - // Restore lost bitmap or solid color background. - if (aBackground.IsBitmap() || aBackground.GetColor() != COL_TRANSPARENT) + // Restore lost bitmap background. + if (aBackground.IsBitmap()) m_pWindow->SetBackground(aBackground); m_pWindow->PushPaintHelper(this, *m_pWindow); m_pWindow->Paint(*m_pWindow, m_aPaintRect); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits