Browse Source

Accurate taskbar fonts for classic theme mitigations

pull/2331/head
aubymori 2 years ago
parent
commit
7c3af3b292
  1. 20
      ExplorerPatcher/dllmain.c

20
ExplorerPatcher/dllmain.c

@ -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
{ {

Loading…
Cancel
Save