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 41 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.

SDK

  • hndlprp.h. Removed duplicate declarations for plugins. Consolidated handle property APIs in public part of header.
  • Add some missing declarations and exports of IListView wrappers.
  • Update objmgr and objprp code to latest SDK.

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.
This was referenced Nov 22, 2024
@DartVanya DartVanya force-pushed the master-dm branch 4 times, most recently from dff2b2f to 1a14c70 Compare December 5, 2024 00:13
@DartVanya DartVanya force-pushed the master-dm branch 2 times, most recently from 871b64b to 1b8d507 Compare December 5, 2024 05:48
@DartVanya DartVanya force-pushed the master-dm branch 2 times, most recently from 951a02a to 29f24b5 Compare December 6, 2024 00:01
@DartVanya DartVanya force-pushed the master-dm branch 2 times, most recently from 9b40b5f to b5a1ec7 Compare December 9, 2024 20:52
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