Skip to content

Commit

Permalink
fix font is black in tree view for dark theme (#55)
Browse files Browse the repository at this point in the history
  • Loading branch information
funap committed May 4, 2023
1 parent 59c68fa commit 7ab5391
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/Explorer/ThemeRenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,15 @@ void ThemeRenderer::ApplyTheme(HWND hwnd)
}
else if (className == WC_TREEVIEW) {
TreeView_SetBkColor(childWindow, self->m_colors.bg);
TreeView_SetTextColor(childWindow, self->m_colors.text);
TreeView_SetTextColor(childWindow, self->m_colors.fg);
::SetWindowTheme(childWindow, self->m_isDarkMode ? L"DarkMode_Explorer" : L"Explorer", nullptr);
}
else if (className == WC_LISTVIEW) {
ListView_SetBkColor(childWindow, self->m_colors.bg);
ListView_SetTextColor(childWindow, self->m_colors.fg);
ListView_SetTextBkColor(childWindow, CLR_NONE);
::InvalidateRect(childWindow, NULL, TRUE);
}
return TRUE;
}, reinterpret_cast<LPARAM>(this));
}
Expand Down

0 comments on commit 7ab5391

Please sign in to comment.