From 170631ff93735f655f8e1b5ed0f3a3f1afa1ddd0 Mon Sep 17 00:00:00 2001 From: Maarten Bent Date: Wed, 7 Jul 2021 22:48:53 +0200 Subject: [PATCH] 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. --- src/msw/renderer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/msw/renderer.cpp b/src/msw/renderer.cpp index 6cfdb37fab..df0259409d 100644 --- a/src/msw/renderer.cpp +++ b/src/msw/renderer.cpp @@ -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);