Skip to content

Commit

Permalink
Add theme support for Job page dialogs
Browse files Browse the repository at this point in the history
  • Loading branch information
DartVanya committed Sep 8, 2024
1 parent f5cafd5 commit 5531668
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 3 deletions.
2 changes: 2 additions & 0 deletions SystemInformer/chproc.c
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,8 @@ INT_PTR CALLBACK PhpChooseProcessDlgProc(
PhpRefreshProcessList(hwndDlg, context);

EnableWindow(GetDlgItem(hwndDlg, IDOK), FALSE);

PhInitializeWindowTheme(hwndDlg, PhEnableThemeSupport);
}
break;
case WM_DESTROY:
Expand Down
4 changes: 2 additions & 2 deletions SystemInformer/hndlstat.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,6 @@ INT_PTR CALLBACK PhpHandleStatisticsDlgProc(
{
context = (PHANDLE_STATISTICS_CONTEXT)lParam;
PhSetWindowContext(hwndDlg, PH_WINDOW_CONTEXT_DEFAULT, context);
if (PhEnableThemeSupport)
PhInitializeWindowTheme(hwndDlg, TRUE);
}
else
{
Expand Down Expand Up @@ -239,6 +237,8 @@ INT_PTR CALLBACK PhpHandleStatisticsDlgProc(
}

ExtendedListView_SortItems(context->ListViewHandle);

PhInitializeWindowTheme(hwndDlg, PhEnableThemeSupport);
}
break;
case WM_DESTROY:
Expand Down
23 changes: 22 additions & 1 deletion SystemInformer/jobprp.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,12 @@ INT_PTR CALLBACK PhpJobStatisticsPageProc(
_In_ LPARAM lParam
);

INT CALLBACK PhpJobStatisticsSheetProc(
_In_ HWND hwndDlg,
_In_ UINT uMsg,
_In_ LPARAM lParam
);

VOID PhShowJobProperties(
_In_ HWND ParentWindowHandle,
_In_ PPH_OPEN_OBJECT OpenObject,
Expand Down Expand Up @@ -589,13 +595,15 @@ VOID PhpShowJobAdvancedProperties(
propSheetHeader.dwFlags =
PSH_NOAPPLYNOW |
PSH_NOCONTEXTHELP |
PSH_PROPTITLE;
PSH_PROPTITLE |
PSH_USECALLBACK;
propSheetHeader.hInstance = PhInstanceHandle;
propSheetHeader.hwndParent = ParentWindowHandle;
propSheetHeader.pszCaption = L"Job";
propSheetHeader.nPages = 2;
propSheetHeader.nStartPage = 0;
propSheetHeader.phpage = pages;
propSheetHeader.pfnCallback = PhpJobStatisticsSheetProc;

// General

Expand Down Expand Up @@ -757,3 +765,16 @@ INT_PTR CALLBACK PhpJobStatisticsPageProc(

return FALSE;
}

INT CALLBACK PhpJobStatisticsSheetProc(
_In_ HWND hwndDlg,
_In_ UINT uMsg,
_In_ LPARAM lParam
)
{
if (uMsg == PSCB_INITIALIZED && PhEnableThemeSupport)
{
PhInitializeWindowTheme(hwndDlg, TRUE);
}
return 0;
}

0 comments on commit 5531668

Please sign in to comment.