X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/259c43f679ca655362b5a439e11c87fc0666d663..f94a81c084696210418b8709e8ab649a18465fa6:/src/msw/listctrl.cpp diff --git a/src/msw/listctrl.cpp b/src/msw/listctrl.cpp index 1771e0ea3f..b24b99daf0 100644 --- a/src/msw/listctrl.cpp +++ b/src/msw/listctrl.cpp @@ -1115,9 +1115,9 @@ int wxListCtrl::GetSelectedItemCount() const // Gets the text colour of the listview wxColour wxListCtrl::GetTextColour() const { - COLORREF ref = ListView_GetTextColor(GetHwnd()); - wxColour col(GetRValue(ref), GetGValue(ref), GetBValue(ref)); - return col; + // Use GetDefaultAttributes instead of ListView_GetTextColor because + // the latter seems to return black all the time (instead of the theme color) + return GetDefaultAttributes().colFg; } // Sets the text colour of the listview