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

The Dark Theme setting does not immediately reflect the change to the system level setting #1270

Closed
gexgd0419 opened this issue Oct 10, 2021 · 4 comments
Labels
Status: Fixed in Next Build Fixed in the next Sandboxie version

Comments

@gexgd0419
Copy link
Contributor

Describe the bug
I know that to fully apply the light/dark theme change, you may still have to restart Sandboxie.
But when you change the setting manually in Sandboxie's global options, it will try to redraw the UI to reflect the theme change.
However, when the dark theme setting is set to follow the Windows system setting, and the system level setting is changed when Sandboxie is running, Sandboxie will not change its theme or redraw anything. It will keep its current theme until you restart Sandboxie.

Expected behavior
Sandboxie should change its theme when its theme is set to follow the system theme and the system theme changes.

System details

  • Sandboxie Plus v0.9.6
@isaak654
Copy link
Collaborator

isaak654 commented Oct 10, 2021

Sandboxie should change its theme when its theme is set to follow the system theme and the system theme changes.

Personally I would suggest an additional option to follow the default Windows color setting for dark/light mode instead of the non-intuitive three values for the same checkbox:

three_button_states

@DavidXanatos
Copy link
Member

I see, but do peopel so often switch? Is there a system wide message issued when the change occurs or would I have to monitor the registry key for changes continuously?

@DavidXanatos DavidXanatos added the More Info Needed More information is needed to move forward label Oct 11, 2021
@gexgd0419
Copy link
Contributor Author

As far as I know, when apps' theme mode, system's theme mode, and/or the accent color changed (or other theme-related settings such as transparency), there will usually be two kinds of broadcast messages:

  • WM_SETTINGCHANGE message (lParam points to string "ImmersiveColorSet"), and
  • WM_DWMCOLORIZATIONCOLORCHANGED message.

Those messages will be broadcast even if you directly changed the corresponding registry value.

From the section name "ImmersiveColorSet", I can assume that the program will not receive such WM_SETTINGCHANGE messages when it is running under Windows 7 or earlier Windows systems.
But DWM does exist in Windows 7, which means that if you changed the colorization settings in Windows 7, the program will receive a WM_DWMCOLORIZATIONCOLORCHANGED message, even though Windows 7 doesn't have a system-level dark theme setting.

Also, I found that changing theme once will issue multiple WM_SETTINGCHANGE and WM_DWMCOLORIZATIONCOLORCHANGED messages in Windows 10.

Haven't tested it on Windows 8 or 8.1.

@DavidXanatos DavidXanatos added Status: Fixed in Next Build Fixed in the next Sandboxie version and removed More Info Needed More information is needed to move forward labels Oct 12, 2021
@DavidXanatos
Copy link
Member

great! will be fixed in next build then :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Fixed in Next Build Fixed in the next Sandboxie version
Projects
None yet
Development

No branches or pull requests

3 participants