summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2019-08-29 18:01:44 +0200
committerMiklos Vajna <vmiklos@collabora.com>2019-08-29 18:44:42 +0200
commit35132e5cd648fd54ffb186039324f5fb954dd08f (patch)
tree3bc0fe25c811dcfb13552aa6b1fce624284f52d9
parent7227e5898ecd3eefe2b819d6be8cd425d15b1f38 (diff)
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 <vmiklos@collabora.com> Tested-by: Jenkins
-rw-r--r--svtools/source/control/valueset.cxx3
-rw-r--r--vcl/source/window/paint.cxx4
2 files changed, 4 insertions, 3 deletions
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);