editeng/source/editeng/StripPortionsHelper.cxx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
New commits: commit 2ebafbb84f4eb6ed55b813bbc24b6a4368236f25 Author: Armin Le Grand (collabora) <[email protected]> AuthorDate: Thu Jul 17 18:37:35 2025 +0200 Commit: Armin Le Grand <[email protected]> CommitDate: Thu Jul 17 20:39:27 2025 +0200 tdf#167511 correctly apply Color in HighContrast mode to text Change-Id: Ie22d8da61284185793e679c57747b7df22138581 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188018 Reviewed-by: Armin Le Grand <[email protected]> Tested-by: Jenkins diff --git a/editeng/source/editeng/StripPortionsHelper.cxx b/editeng/source/editeng/StripPortionsHelper.cxx index 71391194734b..cf8e59d6489e 100644 --- a/editeng/source/editeng/StripPortionsHelper.cxx +++ b/editeng/source/editeng/StripPortionsHelper.cxx @@ -102,10 +102,11 @@ buildTextPortionPrimitive(const DrawPortionInfo& rInfo, const OUString& rText, } } - // create complex text primitive and append - const Color aFontColor(rInfo.mrFont.GetColor()); + // tdf#167511 get FontColor, evtl. adapted for HighContrast + const Color aFontColor(Application::GetSettings().GetStyleSettings().GetHighContrastMode() + ? Application::GetSettings().GetStyleSettings().GetWindowTextColor() + : rInfo.mrFont.GetColor()); const basegfx::BColor aBFontColor(aFontColor.getBColor()); - const Color aTextFillColor(rInfo.mrFont.GetFillColor()); // prepare wordLineMode (for underline and strikeout)
