Use correct text color in LIB_TREE selected items on non-OSX.

(cherry picked from commit 6feafedfbe)
This commit is contained in:
Alex Shvartzkop 2024-02-19 09:52:03 +03:00
parent 12c21abdff
commit 41ffadc987
1 changed files with 7 additions and 2 deletions

View File

@ -91,14 +91,19 @@ public:
dc->DrawLines( 6, points );
}
aRect.Deflate( 1 );
#ifdef __WXOSX__
// We should be able to pass wxDATAVIEW_CELL_SELECTED into RenderText() and have it do
// the right thing -- but it picks wxSYS_COLOUR_HIGHLIGHTTEXT on MacOS and GTK (instead
// the right thing -- but it picks wxSYS_COLOUR_HIGHLIGHTTEXT on MacOS (instead
// of wxSYS_COLOUR_LISTBOXHIGHLIGHTTEXT).
if( aState & wxDATAVIEW_CELL_SELECTED )
dc->SetTextForeground( wxSystemSettings::GetColour( wxSYS_COLOUR_LISTBOXHIGHLIGHTTEXT ) );
aRect.Deflate( 1 );
RenderText( m_text, 0, aRect, dc, 0 );
#else
RenderText( m_text, 0, aRect, dc, aState );
#endif
return true;
}