Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Theme fixes and enhancements #2231

Open
wants to merge 21 commits into
base: master
Choose a base branch
from
Open

Conversation

DartVanya
Copy link
Contributor

@DartVanya DartVanya commented Oct 7, 2024

Full DarkMode support for TaskDialog

Credits to https://github.com/SFTRS/DarkTaskDialog

  • Transit from PhShow(Error|Warning|Information) to PhShow(Error|Warning|Information)2.
  • ExtendedServices: MessageBox to TaskDialog transit.

  • Public PhThemeWindowDrawButton: support tristate checkbox, radio, multiline label.

  • Apply DarkMode_Explorer theme for all checkboxes (even for ListView checks), radio and buttons.

  • Fix artefacts on GroupBox and Static picture controls when window moving back from off-screen.

  • TreeNew: significantly improve visibility of selected item.

  • ExtListVew: fix text readability for hot and selected colored items.

  • Fix drawing of disabled ListView in dark theme Hide ListVIew on Graph settings page instead of disabling.

  • Fix multiline edit artifacts when typing, fix scrollbar.

  • Fix dark theme for new choose dialog.

  • Fix dark ListView header in unsupported system dialogs (skip superclass drawing).

  • Better ListView theme (DarkMode_ItemsView and OpenNcThemeData hook for scrollbars).

  • Add borders to TabControl header and body, selected tab slightly enlarged (behaves like default MS white theme).

  • Add separators for StatusBar parts for better readability.

  • SysLink theme support.

  • Security page CHECKLIST_ACLUI checks theme support and other improvements.

  • Add new theme options: EnableThemeAnimation (default 1), EnableThemeNativeButtons (default 0).


  • Advanced options: menu Reset added (support multiple selection).
  • Highlighting and Graph colors: menu - Reset added.

All changes highlighted on video:

before.mp4
after.mp4
taskdialog-dm.mp4
colors-menu-reset.mp4

- Advanced options menu Reset added
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)
- Removed ListView subclass
- Add options: EnableThemeAnimation (default 1), EnableThemeNativeButtons (default 0)
- Fix the annoying white border what remained from the previous active control in CHECKLIST_ACLUI
- ExtendedServices: MessageBox to TaskDialog transit
Copy link
Member

@jxy-s jxy-s left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes seem fine to me. I had some nits and a question but overall I'm okay with merging it. I would prefer to give @dmex and opportunity to review since this is touching some of the UI code I'm not all that familiar with.

SystemInformer/delayhook.c Show resolved Hide resolved
SystemInformer/main.c Outdated Show resolved Hide resolved
phlib/theme.c Outdated Show resolved Hide resolved
@Vasilich
Copy link

Vasilich commented Nov 3, 2024

@DartVanya
If you already on the UI for dark mode - can you fix the dialogs for network plugin too? There are dialogs like Ping and traceroute, that look weitd...

@DartVanya
Copy link
Contributor Author

dialogs like Ping and traceroute

Yes, it already fixed. See after.mp4 near the end.

SystemInformer/chdlg.c Outdated Show resolved Hide resolved
SystemInformer/main.c Outdated Show resolved Hide resolved
PhShowWarning(
NULL,
PhShowWarning2(
GetDesktopWindow(),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is GetDesktopWindow() used as the parent window?

SystemInformer/main.c Show resolved Hide resolved
@@ -1445,10 +1452,16 @@ VOID PhpProcessStartupParameters(
NULL
) || PhStartupParameters.Help)
{
PhShowInformation(
NULL,
if (PhStartupParameters.Help)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does this delete the -help command and replace the code with UI initialization?

plugins/Updater/updater.c Show resolved Hide resolved
tools/peview/main.c Show resolved Hide resolved
tools/peview/main.c Show resolved Hide resolved
tools/peview/main.c Show resolved Hide resolved
@@ -292,7 +292,7 @@ INT_PTR CALLBACK OptionsDlgProc(

for (LONG i = numberOfItems - 1; i >= 0; i--)
{
PhRemoveListViewItem(listviewHandle, i);
PhRemoveListViewItem(listviewHandle, PhFindListViewItemByParam(listviewHandle, INT_ERROR, listviewItems[i]));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is searching for the index of an item when we already have the index?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants