Skip to content

Commit

Permalink
Full DarkMode support for TaskDialog
Browse files Browse the repository at this point in the history
Credits to https://github.com/SFTRS/DarkTaskDialog
- Highlighting and Graph colors: menu - Reset added
- Fix drawing of disabled ListView in dark theme
- SysLink theme support (call PhInitializeSysLinkTheme to apply to control)
  • Loading branch information
DartVanya committed Oct 9, 2024
1 parent 881c3bf commit a68b486
Show file tree
Hide file tree
Showing 13 changed files with 1,386 additions and 298 deletions.
2 changes: 2 additions & 0 deletions SystemInformer/about.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ static INT_PTR CALLBACK PhpAboutDlgProc(
PhRegisterWindowCallback(hwndDlg, PH_PLUGIN_WINDOW_EVENT_TYPE_TOPMOST, NULL);

PhInitializeWindowTheme(hwndDlg, PhEnableThemeSupport);
if (PhEnableThemeSupport)
PhInitializeSysLinkTheme(GetDlgItem(hwndDlg, IDC_LINK_SF));
}
break;
case WM_DESTROY:
Expand Down
12 changes: 7 additions & 5 deletions SystemInformer/chdlg.c
Original file line number Diff line number Diff line change
Expand Up @@ -568,11 +568,13 @@ INT_PTR CALLBACK PhChooseNewPageDlgProc(
if (PhEnableThemeSupport)
{
SetDCBrushColor(hdc, RGB(50, 50, 50));
FillRect(hdc, &clientRect, GetStockObject(DC_BRUSH));
clientRect.bottom = clientRect.top + PhGetDpi(2, dpi);
InflateRect(&clientRect, -1, 0);
SetDCBrushColor(hdc, RGB(36, 36, 36));
FillRect(hdc, &clientRect, GetStockObject(DC_BRUSH));
FillRect(hdc, &clientRect, PhGetStockBrush(DC_BRUSH));
clientRect.bottom = clientRect.top + 1;
SetDCBrushColor(hdc, PhThemeWindowForegroundColor);
FillRect(hdc, &clientRect, PhGetStockBrush(DC_BRUSH));
PhOffsetRect(&clientRect, 0, 1);
SetDCBrushColor(hdc, PhThemeWindowBackground2Color);
FillRect(hdc, &clientRect, PhGetStockBrush(DC_BRUSH));
}
else
{
Expand Down
Loading

0 comments on commit a68b486

Please sign in to comment.