From 829d3fd09420de82429546d0216f283208049fdf Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 22 May 2021 16:06:10 +0100 Subject: [PATCH] Restore wxGrid cursor visibility under non-Mac platforms The changes of 3c28244806 (Improve wxGrid appearance in dark mode under macOS, 2020-08-07) resulted in using white highlight colour over white background under at least MSW and probably elsewhere, making the grid cursor invisible by default. Fix this by using wxSYS_COLOUR_WINDOWTEXT which must contrast with wxSYS_COLOUR_WINDOW used for the background colour. --- src/generic/grid.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/generic/grid.cpp b/src/generic/grid.cpp index 41a11ccda6..19f60c9803 100644 --- a/src/generic/grid.cpp +++ b/src/generic/grid.cpp @@ -3012,7 +3012,7 @@ void wxGrid::Init() m_gridLinesEnabled = true; m_gridLinesClipHorz = m_gridLinesClipVert = true; - m_cellHighlightColour = wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHTTEXT); + m_cellHighlightColour = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT); m_cellHighlightPenWidth = 2; m_cellHighlightROPenWidth = 1; if ( wxSystemSettings::GetAppearance().IsDark() )