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.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user