Don't take focus into account when setting selected state for cell text

The selected state is always set for the background of a selected cell,
so it should also be set for the text/foreground. Fixes text color for
unfocused selected cells with Windows high-contrast themes.
This commit is contained in:
Paul Cornett 2021-12-28 23:20:05 -08:00
parent c61b6fad7d
commit 1700f62fd4

View File

@ -2832,7 +2832,7 @@ void wxDataViewMainWindow::OnPaint( wxPaintEvent &WXUNUSED(event) )
bool selected = m_selection.IsSelected(item);
int state = 0;
if (m_hasFocus && selected)
if (selected)
state |= wxDATAVIEW_CELL_SELECTED;
cell->SetState(state);