vcl/win/gdi/salnativewidgets-luna.cxx | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)
New commits: commit d879bc9e76afb1873236a1aabd3df6bd4f3ad495 Author: Sahil Gautam <sahil.gautam.ext...@allotropia.de> AuthorDate: Fri Feb 7 23:40:31 2025 +0530 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Mon Feb 10 22:58:23 2025 +0100 tdf#164972 Fix white-on-white themed scrollbars on windows - in case of light mode, decrease the base color luminance. - this is just a temporary fix similar to how other controls like disabled buttons are themed and would be replaced with themed native controls. Change-Id: If574e96499f48a5139775a2efcd6aa1f20e26c43 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181271 Tested-by: Jenkins Reviewed-by: Sahil Gautam <sahil.gautam.ext...@allotropia.de> (cherry picked from commit 731a4876b72d9794d2a76f170d0338f799369d3f) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181332 Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> diff --git a/vcl/win/gdi/salnativewidgets-luna.cxx b/vcl/win/gdi/salnativewidgets-luna.cxx index 36011eb31bee..d0aa805284b8 100644 --- a/vcl/win/gdi/salnativewidgets-luna.cxx +++ b/vcl/win/gdi/salnativewidgets-luna.cxx @@ -498,10 +498,17 @@ static bool drawThemedControl(HDC hDC, ControlType nType, int iPart, int iState, Color aScrollBarThumbColor = ThemeColors::GetThemeColors().GetBaseColor(); const Color& rBackgroundColor = ThemeColors::GetThemeColors().GetWindowColor(); + bool bUseDarkMode = UseDarkMode(); if (iState == SCRBS_PRESSED) - aScrollBarThumbColor.IncreaseLuminance(60); + if (bUseDarkMode) + aScrollBarThumbColor.IncreaseLuminance(60); + else + aScrollBarThumbColor.DecreaseLuminance(60); else if (iState = SCRBS_HOT) - aScrollBarThumbColor.IncreaseLuminance(30); + if (bUseDarkMode) + aScrollBarThumbColor.IncreaseLuminance(30); + else + aScrollBarThumbColor.DecreaseLuminance(30); ScopedHBRUSH hbrush(CreateSolidBrush(RGB(rBackgroundColor.GetRed(), rBackgroundColor.GetGreen(),