From b202dec93cd38c3c0684682a834a77c5eeb070de Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 4 Jun 2022 16:17:10 +0100 Subject: [PATCH] Highlight the grid row/column being dragged on all platforms Remove __WXGTK__ checks and highlight it everywhere, this can be useful under other platforms too depending on the colour schema and not having platform-specific checks is better than having them if they're not absolutely required. If we really want to avoid highlighting in some cases, we should check for the contrast between the border and background colours, but it seems to be much simpler to just always show it. --- src/generic/grid.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/generic/grid.cpp b/src/generic/grid.cpp index e74135db48..51363b09a1 100644 --- a/src/generic/grid.cpp +++ b/src/generic/grid.cpp @@ -7114,10 +7114,9 @@ void wxGrid::DrawRowLabel( wxDC& dc, int row ) rend.DrawBorder(*this, dc, rect); else { -#ifdef __WXGTK__ + // just highlight the current row dc.SetPen(wxPen(wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHT))); dc.DrawRectangle(rect); -#endif rect.Deflate(GetBorder() == wxBORDER_NONE ? 2 : 1); } @@ -7271,10 +7270,9 @@ void wxGrid::DrawColLabel(wxDC& dc, int col) rend.DrawBorder(*this, dc, rect); else { -#ifdef __WXGTK__ + // just highlight the current column dc.SetPen(wxPen(wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHT))); dc.DrawRectangle(rect); -#endif rect.Deflate(GetBorder() == wxBORDER_NONE ? 2 : 1); } }