cui/source/options/appearance.cxx | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-)
New commits: commit 8662edae356923e96b20eb6dac586129c6157af5 Author: Sahil Gautam <[email protected]> AuthorDate: Fri Jan 30 18:37:10 2026 +0530 Commit: Sahil Gautam <[email protected]> CommitDate: Mon Feb 2 12:17:01 2026 +0100 fix: don't load the default colors literally on appearance change When we set the colors to the default values (not COL_AUTO), the code in writer's `SwDrawTextInfo::ApplyAutoColor` function (in fntcache.cxx) skips the block of code which changes the font color based on the document color (or the default font color). And this is unnecessary in general as when a color is set to `COL_AUTO`, the getter `ColorConfig::GetColorValue` returns the default value if one is not set. Change-Id: I3633eb01746e2b8078e1452c0ba7d3e1b74866b3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198430 Tested-by: Jenkins CollaboraOffice <[email protected]> Reviewed-by: Sahil Gautam <[email protected]> diff --git a/cui/source/options/appearance.cxx b/cui/source/options/appearance.cxx index 278dc1f177ef..ecfcf3ff628e 100644 --- a/cui/source/options/appearance.cxx +++ b/cui/source/options/appearance.cxx @@ -580,14 +580,10 @@ void SvxAppearanceTabPage::UpdateOldAppearance() return; ColorConfigValue aValue; - bool bIsDarkModeEnabled = IsDarkModeEnabled(); for (size_t i = 0; i < WINDOWCOLOR; ++i) { - if (bIsDarkModeEnabled) - aValue.nDarkColor = ColorConfig::GetDefaultColor(static_cast<ColorConfigEntry>(i), 1); - else - aValue.nLightColor = ColorConfig::GetDefaultColor(static_cast<ColorConfigEntry>(i), 0); - + aValue.nDarkColor = COL_AUTO; + aValue.nLightColor = COL_AUTO; pColorConfig->SetColorValue(static_cast<ColorConfigEntry>(i), aValue); } }
