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:
@@ -2832,7 +2832,7 @@ void wxDataViewMainWindow::OnPaint( wxPaintEvent &WXUNUSED(event) )
|
|||||||
bool selected = m_selection.IsSelected(item);
|
bool selected = m_selection.IsSelected(item);
|
||||||
|
|
||||||
int state = 0;
|
int state = 0;
|
||||||
if (m_hasFocus && selected)
|
if (selected)
|
||||||
state |= wxDATAVIEW_CELL_SELECTED;
|
state |= wxDATAVIEW_CELL_SELECTED;
|
||||||
|
|
||||||
cell->SetState(state);
|
cell->SetState(state);
|
||||||
|
|||||||
Reference in New Issue
Block a user