Renderer theme with EXPLORER::LISTVIEW is not always available

It works in the render sample, but not in the dataview sample.
Fallback to using LISTVIEW if EXPLORER::LISTVIEW results in an invalid hTheme.
This commit is contained in:
Maarten Bent
2021-07-07 22:48:53 +02:00
parent 75c4735016
commit 170631ff93

View File

@@ -1011,7 +1011,7 @@ wxRendererXP::DrawItemSelectionRect(wxWindow *win,
const wxRect& rect,
int flags)
{
wxUxThemeHandle hTheme(win, L"EXPLORER::LISTVIEW");
wxUxThemeHandle hTheme(win, L"EXPLORER::LISTVIEW;LISTVIEW");
const int itemState = GetListItemState(flags);
@@ -1038,7 +1038,7 @@ void wxRendererXP::DrawItemText(wxWindow* win,
int flags,
wxEllipsizeMode ellipsizeMode)
{
wxUxThemeHandle hTheme(win, L"EXPLORER::LISTVIEW");
wxUxThemeHandle hTheme(win, L"EXPLORER::LISTVIEW;LISTVIEW");
const int itemState = GetListItemState(flags);