Skip to content

Commit

Permalink
Accurate taskbar fonts for classic theme mitigations
Browse files Browse the repository at this point in the history
  • Loading branch information
aubymori authored and Amrsatrio committed Oct 21, 2023
1 parent 67b7a27 commit 8fc53a1
Showing 1 changed file with 4 additions and 16 deletions.
20 changes: 4 additions & 16 deletions ExplorerPatcher/dllmain.c
Original file line number Diff line number Diff line change
Expand Up @@ -8062,27 +8062,15 @@ HRESULT explorer_DrawThemeTextEx(
SystemParametersInfoW(SPI_GETNONCLIENTMETRICS, sizeof(NONCLIENTMETRICSW), &ncm, 0);

HFONT hFont = NULL;
if (bIsActiveUnhovered)
if (bIsActiveUnhovered || bIsActiveHovered)
{
hFont = CreateFontIndirectW(&(ncm.lfCaptionFont));
}
else if (bIsInactiveUnhovered)
{
hFont = CreateFontIndirectW(&(ncm.lfMenuFont));
}
else if (bIsActiveHovered)
{
hFont = CreateFontIndirectW(&(ncm.lfCaptionFont));
}
else if (bIsInactiveHovered)
{
hFont = CreateFontIndirectW(&(ncm.lfMenuFont));
ncm.lfCaptionFont.lfWeight = FW_BOLD;
}
else
{
hFont = CreateFontIndirectW(&(ncm.lfMenuFont));
//wprintf(L"DrawThemeTextEx %d %d %s\n", iPartId, iStateId, pszText);
ncm.lfCaptionFont.lfWeight = FW_NORMAL;
}
hFont = CreateFontIndirectW(&(ncm.lfCaptionFont));

if (iPartId == 5 && iStateId == 0) // clock
{
Expand Down

0 comments on commit 8fc53a1

Please sign in to comment.