From 7c3af3b2924b8e1a5c437c82523e08b323915ff3 Mon Sep 17 00:00:00 2001 From: aubymori Date: Sat, 21 Oct 2023 01:21:17 -0500 Subject: [PATCH] Accurate taskbar fonts for classic theme mitigations --- ExplorerPatcher/dllmain.c | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/ExplorerPatcher/dllmain.c b/ExplorerPatcher/dllmain.c index 2ecb141..da3f4de 100644 --- a/ExplorerPatcher/dllmain.c +++ b/ExplorerPatcher/dllmain.c @@ -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 {