From f1425dad131cd44d49ce5182378738b685fcac66 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 23 May 2020 19:50:11 +0200 Subject: [PATCH] Don't hard code grid lines colour in wxGrid Use wxSYS_COLOUR_BTNFACE instead of the hardcoded value of this colour in "Windows Classic" theme, which was probably used back when the commit 73145b0ed1 (Applied patches by Scott Pleiter:, 2002-12-09), which was supposed to change wxGrid to use system colours (among other things), was done. Nowadays wxSYS_COLOUR_BTNFACE is 0xF0F0F0 rather than 0xC0C0C0, which is quite different visually, but it still seems better to use the system colour rather than the fixed value, especially for platforms with dark mode support. Closes https://github.com/wxWidgets/wxWidgets/pull/1866 --- 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 33966c056c..ee8b4adc5e 100644 --- a/src/generic/grid.cpp +++ b/src/generic/grid.cpp @@ -2844,7 +2844,7 @@ void wxGrid::Init() m_minAcceptableColWidth = m_minAcceptableRowHeight = 0; - m_gridLineColour = wxColour( 192,192,192 ); + m_gridLineColour = wxSystemSettings::GetColour(wxSYS_COLOUR_BTNFACE); m_gridLinesEnabled = true; m_gridLinesClipHorz = m_gridLinesClipVert = true;