Show custom foreground colour when theme is used.

This commit is contained in:
Maarten Bent
2015-12-16 21:04:15 +01:00
parent bbe61adae8
commit 1585530623

View File

@@ -1036,10 +1036,20 @@ void wxRendererXP::DrawItemText(wxWindow* win,
textOpts.dwSize = sizeof(textOpts);
textOpts.dwFlags = DTT_STATEID;
textOpts.iStateId = itemState;
if (flags & wxCONTROL_DISABLED)
wxColour textColour = dc.GetTextForeground();
if (flags & wxCONTROL_SELECTED)
{
textColour = wxSystemSettings::GetColour(wxSYS_COLOUR_LISTBOXTEXT);
}
else if (flags & wxCONTROL_DISABLED)
{
textColour = wxSystemSettings::GetColour(wxSYS_COLOUR_GRAYTEXT);
}
if (textColour.IsOk()) {
textOpts.dwFlags |= DTT_TEXTCOLOR;
textOpts.crText = wxSystemSettings::GetColour(wxSYS_COLOUR_GRAYTEXT).GetPixel();
textOpts.crText = textColour.GetPixel();
}
DWORD textFlags = DT_NOPREFIX;