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

PhReInitializeTheme: runtime theme switching on ImmersiveColorSet message #2284

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

Conversation

DartVanya
Copy link
Contributor

@DartVanya DartVanya commented Nov 17, 2024

General

  • Theme can be changed at runtime w/o restart by EnableThemeSupport and EnableThemeUseWindowsTheme. All PH/PV windows and dialogs will be redrawed automatically.
  • If EnableThemeUseWindowsTheme enabled theme will be switched automatically when Windows theme is changing.
  • Streamer mode, acrylic, theme custom colors settings are applied immediately on all windows w/o restart.
  • New option EnableThemeUseWindowsTheme - Use Windows app color mode. On default settings PH will use current Windows theme.

phlib and other UI fixes

  • Moved delayhook to phlib.
  • phlib PhIsThemeSupportEnabled, PhReInitializeTheme, PhReInitializeStreamerMode. Exported for plugins.
  • New option EnableThemeTabBorders (default 0).
  • TreeNew: fix custom ForeColor for dark mode.

If AppMode is set to PreferredAppModeDarkOnDark, PhShouldAppsUseDarkMode should return current Windows app color mode.
It's weird that sometimes it can return incorrect inverted value (idk why).
In this case use PhGetAppsUseLightTheme() to retrieve raw value from registry.

When app mode set to always dark/light all subsequent calls to PhShouldAppsUseDarkMode always ignore
the current Windows app color mode. Possible return values are:

PreferredAppMode PhShouldAppsUseDarkMode return PhGetAppsUseLightTheme return
PreferredAppModeDisabled current Windows app color mode current Windows app color mode
PreferredAppModeDarkOnDark current Windows app color mode current Windows app color mode
PreferredAppModeDarkAlways always TRUE current Windows app color mode
PreferredAppModeLightAlways always FALSE current Windows app color mode
dark_magic.mp4

- phlib PhIsThemeSupportEnabled, exported for plugins.
- New option EnableThemeUseWindowsTheme - Use Windows app color mode. On default settings PH will use current Windows theme.
- New option EnableThemeTabBorders (default 0).
@dmex dmex self-requested a review November 17, 2024 14:19
@dmex dmex self-assigned this Nov 17, 2024
- KphObjectAttributesInformation -> KphObjectExtendedInformation, retrieve object address, type index and flags.
- Public hndlmenu.h APIs. ID_HANDLE_OBJECTPROPERTIES[1/2] menu support for Device/File, Key, Section handles.
- Add Security menu item.
- Add Name and Original name columns for Device/File, Key, ALPC Port.
@DartVanya DartVanya force-pushed the master-dm branch 2 times, most recently from af0be72 to ed3d62c Compare November 20, 2024 05:14
- Handles tab Refresh (F5) button added.
- EtTreeViewFindItem add reverse scan for more reliable result.
- [Resolver] Extract Section information for more kernel objects using driver.
@DartVanya DartVanya changed the title Moved delayhook to phlib PhReInitializeTheme: runtime theme switching on ImmersiveColorSet message Nov 22, 2024
…sage

- Theme can be changed at runtime w/o restart by EnableThemeSupport and EnableThemeUseWindowsTheme. All PH/PV windows and dialogs will be redrawed automatically.
- If EnableThemeUseWindowsTheme enabled theme will be switched automatically when Windows theme is changing.
- Streamer mode, acrylic, theme custom colors settings are applied immediately on all windows w/o restart.
- TreeNew: fix custom ForeColor for dark mode.
@DartVanya
Copy link
Contributor Author

I think this PR is ready to review. 😊

@uwydoc
Copy link

uwydoc commented Nov 26, 2024

long-awaited feature for me!

@DartVanya DartVanya force-pushed the master-dm branch 2 times, most recently from b1f8743 to a4c4d56 Compare November 26, 2024 22:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants