Skip to content

Commit 07b71cd

Browse files
committed
Fix options general tab listview font
1 parent 9def7a6 commit 07b71cd

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

ProcessHacker/options.c

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1590,15 +1590,22 @@ INT_PTR CALLBACK PhpOptionsGeneralDlgProc(
15901590
PhMoveReference(&NewFontSelection, PhBufferToHexString((PUCHAR)&font, sizeof(LOGFONT)));
15911591

15921592
// Update the button's font.
1593-
1594-
if (CurrentFontInstance)
1595-
DeleteFont(CurrentFontInstance);
1596-
1593+
if (CurrentFontInstance) DeleteFont(CurrentFontInstance);
15971594
CurrentFontInstance = CreateFontIndirect(&font);
15981595

15991596
SetWindowFont(OptionsTreeControl, CurrentFontInstance, TRUE); // HACK
16001597
SetWindowFont(GetDlgItem(hwndDlg, IDC_SETTINGS), CurrentFontInstance, TRUE);
16011598
SetWindowFont(GetDlgItem(hwndDlg, IDC_FONT), CurrentFontInstance, TRUE);
1599+
1600+
// Re-add the listview items for the new font (dmex)
1601+
GeneralListViewStateInitializing = TRUE;
1602+
HWND listviewHandle = GetDlgItem(hwndDlg, IDC_SETTINGS);
1603+
ExtendedListView_SetRedraw(listviewHandle, FALSE);
1604+
ListView_DeleteAllItems(listviewHandle);
1605+
PhpAdvancedPageLoad(hwndDlg);
1606+
ExtendedListView_SetRedraw(listviewHandle, TRUE);
1607+
GeneralListViewStateInitializing = FALSE;
1608+
16021609
RestartRequired = TRUE; // HACK: Fix ToolStatus plugin toolbar resize on font change
16031610
}
16041611
}

0 commit comments

Comments
 (0)