1
0
mirror of https://github.com/valinet/ExplorerPatcher.git synced 2024-11-24 07:30:22 +01:00

Accurate taskbar fonts for classic theme mitigations

This commit is contained in:
aubymori 2023-10-21 01:21:17 -05:00 committed by Amr Satrio
parent 67b7a27044
commit 8fc53a1285

View File

@ -8062,27 +8062,15 @@ HRESULT explorer_DrawThemeTextEx(
SystemParametersInfoW(SPI_GETNONCLIENTMETRICS, sizeof(NONCLIENTMETRICSW), &ncm, 0); SystemParametersInfoW(SPI_GETNONCLIENTMETRICS, sizeof(NONCLIENTMETRICSW), &ncm, 0);
HFONT hFont = NULL; HFONT hFont = NULL;
if (bIsActiveUnhovered) if (bIsActiveUnhovered || bIsActiveHovered)
{ {
hFont = CreateFontIndirectW(&(ncm.lfCaptionFont)); ncm.lfCaptionFont.lfWeight = FW_BOLD;
}
else if (bIsInactiveUnhovered)
{
hFont = CreateFontIndirectW(&(ncm.lfMenuFont));
}
else if (bIsActiveHovered)
{
hFont = CreateFontIndirectW(&(ncm.lfCaptionFont));
}
else if (bIsInactiveHovered)
{
hFont = CreateFontIndirectW(&(ncm.lfMenuFont));
} }
else else
{ {
hFont = CreateFontIndirectW(&(ncm.lfMenuFont)); ncm.lfCaptionFont.lfWeight = FW_NORMAL;
//wprintf(L"DrawThemeTextEx %d %d %s\n", iPartId, iStateId, pszText);
} }
hFont = CreateFontIndirectW(&(ncm.lfCaptionFont));
if (iPartId == 5 && iStateId == 0) // clock if (iPartId == 5 && iStateId == 0) // clock
{ {