From b27141d601f9c0cbeb1c9c371816974819fdbd2e Mon Sep 17 00:00:00 2001 From: princesinghtomar Date: Mon, 28 Dec 2020 16:30:07 +0530 Subject: tdf#138654 Number format preview uses dark background and font Change-Id: I5f2ad87f017159191e39a4a1ce665c01d3223e44 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108400 Tested-by: Jenkins Reviewed-by: Heiko Tietze (cherry picked from commit 2aff7b2622b3fcc3115037d48e033fe1b7ab627a) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108588 Reviewed-by: Adolfo Jayme Barrientos --- cui/source/tabpages/numfmt.cxx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'cui/source') diff --git a/cui/source/tabpages/numfmt.cxx b/cui/source/tabpages/numfmt.cxx index 5a6436e8998b..99086823823b 100644 --- a/cui/source/tabpages/numfmt.cxx +++ b/cui/source/tabpages/numfmt.cxx @@ -141,13 +141,12 @@ void SvxNumberPreview::Paint(vcl::RenderContext& rRenderContext, const ::tools:: rRenderContext.Push(PushFlags::ALL); svtools::ColorConfig aColorConfig; - rRenderContext.SetTextColor(aColorConfig.GetColorValue( svtools::FONTCOLOR ).nColor); - const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings(); - rRenderContext.SetBackground(rStyleSettings.GetWindowColor()); + rRenderContext.SetTextColor(aColorConfig.GetColorValue(svtools::FONTCOLOR).nColor); + rRenderContext.SetBackground(aColorConfig.GetColorValue(svtools::DOCCOLOR).nColor); vcl::Font aDrawFont = rRenderContext.GetFont(); Size aSzWnd(GetOutputSizePixel()); - OUString aTmpStr( aPrevStr ); + OUString aTmpStr(aPrevStr); tools::Long nLeadSpace = (aSzWnd.Width() - rRenderContext.GetTextWidth(aTmpStr)) / 2; aDrawFont.SetTransparent(true); -- cgit