Fix colour of selected text in high contrast themes in wxDVC wxSYS_COLOUR_LISTBOXTEXT doesn't have good contrast with the selected items background colour in high contrast themes and while using wxSYS_COLOUR_HIGHLIGHTTEXT does work for these themes, it doesn't work well for the standard theme. Use the theme colour instead of system colours for something that seems to work well enough in all cases. Closes #26378. Co-Authored-By: Vadim Zeitlin <va...@wxwidgets.org>
| ... | ... | @@ -972,7 +972,7 @@ void wxRendererXP::DrawItemText(wxWindow* win, |
| 972 | 972 | wxColour textColour = dc.GetTextForeground();
|
| 973 | 973 | if (flags & wxCONTROL_SELECTED)
|
| 974 | 974 | {
|
| 975 | - textColour = wxSystemSettings::GetColour(wxSYS_COLOUR_LISTBOXTEXT);
|
|
| 975 | + textColour = hTheme.GetColour(LVP_LISTITEM, TMT_TEXTCOLOR, LISS_SELECTED);
|
|
| 976 | 976 | }
|
| 977 | 977 | else if (flags & wxCONTROL_DISABLED)
|
| 978 | 978 | {
|
—
View it on GitLab.
You're receiving this email because of your account on gitlab.com. Manage all notifications · Help