vcl/source/outdev/rect.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit 4afc3acbf49f440888713ef9f751038f2a1dde31 Author: Dan Williams <[email protected]> AuthorDate: Thu Jan 8 13:48:50 2026 -0600 Commit: Dan Williams <[email protected]> CommitDate: Wed Feb 25 16:42:18 2026 +0100 tdf#170120 vcl: make DrawSelectionBackground()'s HC switch more specific Looking at repo history bBright was originally added for High Contrast mode, but with macOS Tahoe returning COL_WHITE for window backgrounds by default, it now captures normal macOS color schemes as well. This leads to ugly black backgrounds on toolbar buttons on mouse-over. Make the bBright/High Contrast check more specific, to actually check for high contrast mode. This preserves the original intent but allows macOS Tahoe to display properly. This does mean that custom themes that set FaceColor to COL_WHITE will no longer have the same visual behavior, but theming is not enabled by default anyway. Change-Id: I16a2408f3ff9306a53a3d8be79df04c3517c9138 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196874 Reviewed-by: Dan Williams <[email protected]> Tested-by: Jenkins diff --git a/vcl/source/outdev/rect.cxx b/vcl/source/outdev/rect.cxx index 0461a8a548c1..714de8ccd7bd 100644 --- a/vcl/source/outdev/rect.cxx +++ b/vcl/source/outdev/rect.cxx @@ -564,7 +564,7 @@ Color OutputDevice::DrawSelectionBackground(const tools::Rectangle& rRect, Color aSelectionFillColor(aSelectionBorderColor); bool bDark = rStyles.GetFaceColor().IsDark(); - bool bBright = ( rStyles.GetFaceColor() == COL_WHITE ); + bool bBright = !bDark && rStyles.GetHighContrastMode(); int c1 = aSelectionBorderColor.GetLuminance(); int c2 = aWinBackgroundColor.GetLuminance();
