Skip to content

Commit 8fc53a1

Browse files
aubymoriAmrsatrio
authored andcommitted
Accurate taskbar fonts for classic theme mitigations
1 parent 67b7a27 commit 8fc53a1

File tree

1 file changed

+4
-16
lines changed

1 file changed

+4
-16
lines changed

ExplorerPatcher/dllmain.c

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8062,27 +8062,15 @@ HRESULT explorer_DrawThemeTextEx(
80628062
SystemParametersInfoW(SPI_GETNONCLIENTMETRICS, sizeof(NONCLIENTMETRICSW), &ncm, 0);
80638063

80648064
HFONT hFont = NULL;
8065-
if (bIsActiveUnhovered)
8065+
if (bIsActiveUnhovered || bIsActiveHovered)
80668066
{
8067-
hFont = CreateFontIndirectW(&(ncm.lfCaptionFont));
8068-
}
8069-
else if (bIsInactiveUnhovered)
8070-
{
8071-
hFont = CreateFontIndirectW(&(ncm.lfMenuFont));
8072-
}
8073-
else if (bIsActiveHovered)
8074-
{
8075-
hFont = CreateFontIndirectW(&(ncm.lfCaptionFont));
8076-
}
8077-
else if (bIsInactiveHovered)
8078-
{
8079-
hFont = CreateFontIndirectW(&(ncm.lfMenuFont));
8067+
ncm.lfCaptionFont.lfWeight = FW_BOLD;
80808068
}
80818069
else
80828070
{
8083-
hFont = CreateFontIndirectW(&(ncm.lfMenuFont));
8084-
//wprintf(L"DrawThemeTextEx %d %d %s\n", iPartId, iStateId, pszText);
8071+
ncm.lfCaptionFont.lfWeight = FW_NORMAL;
80858072
}
8073+
hFont = CreateFontIndirectW(&(ncm.lfCaptionFont));
80868074

80878075
if (iPartId == 5 && iStateId == 0) // clock
80888076
{

0 commit comments

Comments
 (0)