Skip to content

Commit

Permalink
Merge pull request #31 from processhacker/master
Browse files Browse the repository at this point in the history
[pull] master from processhacker:master
  • Loading branch information
pull[bot] authored Oct 3, 2020
2 parents 749f1e7 + c291727 commit 1b8666c
Showing 1 changed file with 7 additions and 20 deletions.
27 changes: 7 additions & 20 deletions ProcessHacker/chcol.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ typedef struct _COLUMNS_DIALOG_CONTEXT
PPH_LIST ActiveListArray;
PPH_STRING InactiveSearchboxText;
PPH_STRING ActiveSearchboxText;

} COLUMNS_DIALOG_CONTEXT, *PCOLUMNS_DIALOG_CONTEXT;

INT_PTR CALLBACK PhpColumnsDlgProc(
Expand Down Expand Up @@ -127,21 +126,15 @@ static HFONT PhpColumnsGetCurrentFont(
VOID
)
{
HFONT result = NULL;
LOGFONT font;
PPH_STRING fontHexString;

fontHexString = PhGetStringSetting(L"Font");
NONCLIENTMETRICS metrics = { sizeof(NONCLIENTMETRICS) };
HFONT font;

if (fontHexString->Length / sizeof(WCHAR) / 2 == sizeof(LOGFONT))
{
if (PhHexStringToBuffer(&fontHexString->sr, (PUCHAR)&font))
{
result = CreateFontIndirect(&font);
}
}
if (SystemParametersInfo(SPI_GETNONCLIENTMETRICS, 0, &metrics, 0))
font = CreateFontIndirect(&metrics.lfMessageFont);
else
font = NULL;

return result;
return font;
}

BOOLEAN PhpColumnsWordMatchStringRef(
Expand Down Expand Up @@ -257,12 +250,6 @@ INT_PTR CALLBACK PhpColumnsDlgProc(
PhCreateSearchControl(hwndDlg, context->SearchInactiveHandle, L"Inactive columns...");
PhCreateSearchControl(hwndDlg, context->SearchActiveHandle, L"Active columns...");

if (context->ControlFont)
{
SetWindowFont(context->InactiveWindowHandle, context->ControlFont, TRUE);
SetWindowFont(context->ActiveWindowHandle, context->ControlFont, TRUE);
}

Button_Enable(GetDlgItem(hwndDlg, IDC_HIDE), FALSE);
Button_Enable(GetDlgItem(hwndDlg, IDC_SHOW), FALSE);
Button_Enable(GetDlgItem(hwndDlg, IDC_MOVEUP), FALSE);
Expand Down

0 comments on commit 1b8666c

Please sign in to comment.