diff options
author | Heiko Tietze <tietze.heiko@gmail.com> | 2022-02-18 11:29:26 +0100 |
---|---|---|
committer | Heiko Tietze <heiko.tietze@documentfoundation.org> | 2022-02-18 21:12:30 +0100 |
commit | 87aeb7be943921942f791cd182122e8e073ce804 (patch) | |
tree | 1d6463721810e4c8cd5261d2d91132cb92c3df22 /sw/source/ui | |
parent | d0a527ec09516bc7215baf229adb90cd21ffa27a (diff) |
Resolves tdf#137381 - Use app colors on chapter numbering preview
Change-Id: I8e5edec1ad6f4b6f44855014ce91a642efbd75f9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130133
Tested-by: Jenkins
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
Diffstat (limited to 'sw/source/ui')
-rw-r--r-- | sw/source/ui/misc/outline.cxx | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/sw/source/ui/misc/outline.cxx b/sw/source/ui/misc/outline.cxx index c7fa599c9bfa..3c1345f308ae 100644 --- a/sw/source/ui/misc/outline.cxx +++ b/sw/source/ui/misc/outline.cxx @@ -42,6 +42,7 @@ #include <outline.hrc> #include <strings.hrc> #include <paratr.hxx> +#include <svtools/colorcfg.hxx> #include <IDocumentOutlineNodes.hxx> @@ -875,8 +876,8 @@ void NumberingPreview::Paint(vcl::RenderContext& rRenderContext, const tools::Re pVDev->SetOutputSize(aSize); // #101524# OJ - pVDev->SetFillColor(rRenderContext.GetSettings().GetStyleSettings().GetWindowColor()); - pVDev->SetLineColor(rRenderContext.GetSettings().GetStyleSettings().GetButtonTextColor()); + pVDev->SetFillColor(SwViewOption::GetDocColor()); + pVDev->SetLineColor(SwViewOption::GetDocBoundariesColor()); pVDev->DrawRect(tools::Rectangle(Point(0,0), aSize)); if (pActNum) @@ -897,8 +898,11 @@ void NumberingPreview::Paint(vcl::RenderContext& rRenderContext, const tools::Re tools::Long nYStart = 4; aStdFont = OutputDevice::GetDefaultFont(DefaultFontType::UI_SANS, GetAppLanguage(), GetDefaultFontFlags::OnlyOne, &rRenderContext); - // #101524# OJ - aStdFont.SetColor(SwViewOption::GetFontColor()); + + if (svtools::ColorConfig().GetColorValue(svtools::FONTCOLOR, false).nColor == COL_AUTO) + aStdFont.SetColor( SwViewOption::GetDocColor().IsDark() ? COL_WHITE : COL_BLACK ); + else + aStdFont.SetColor( SwViewOption::GetFontColor() ); const tools::Long nFontHeight = nYStep * ( bPosition ? 15 : 6 ) / 10; aStdFont.SetFontSize(Size( 0, nFontHeight )); |