vcl/win/gdi/salnativewidgets-luna.cxx | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)
New commits: commit 731a4876b72d9794d2a76f170d0338f799369d3f Author: Sahil Gautam <sahil.gautam.ext...@allotropia.de> AuthorDate: Fri Feb 7 23:40:31 2025 +0530 Commit: Sahil Gautam <sahil.gautam.ext...@allotropia.de> CommitDate: Sat Feb 8 07:40:14 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> diff --git a/vcl/win/gdi/salnativewidgets-luna.cxx b/vcl/win/gdi/salnativewidgets-luna.cxx index 993a0113dcff..878a28003714 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(),