In GetTextColour, use GetDefaultAttributes instead of ListView_GetTextColor because the latter seems to return black all the time (instead of the theme color)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35732 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1115,9 +1115,9 @@ int wxListCtrl::GetSelectedItemCount() const
|
|||||||
// Gets the text colour of the listview
|
// Gets the text colour of the listview
|
||||||
wxColour wxListCtrl::GetTextColour() const
|
wxColour wxListCtrl::GetTextColour() const
|
||||||
{
|
{
|
||||||
COLORREF ref = ListView_GetTextColor(GetHwnd());
|
// Use GetDefaultAttributes instead of ListView_GetTextColor because
|
||||||
wxColour col(GetRValue(ref), GetGValue(ref), GetBValue(ref));
|
// the latter seems to return black all the time (instead of the theme color)
|
||||||
return col;
|
return GetDefaultAttributes().colFg;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sets the text colour of the listview
|
// Sets the text colour of the listview
|
||||||
|
Reference in New Issue
Block a user