-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Show a dark title bar when a dark theme in ILSpy is selected #2950
Comments
I have read the various comments in the PR #2947. Let's look at this from the user's point of view: if I switch a theme in ILSpy, I expect consistent behavior regardless of the OS's settings regarding light/dark. So, me being light in Win11, selecting dark in ILSpy, I would expect the title bar to follow - and not like in the PR be a no-op ("Style the window title bar" is meeting that expectation). |
Also just tried a simple sample app, using DWMWA_USE_IMMERSIVE_DARK_MODE. However I only managed to get a pitch-black title bar, no matter what my windows settings are: So if we anyhow ignore the windows theme settings, it would look better if we set the color individually. |
Simply floating a few ideas: Can we query the OS light/dark colors? What I am getting at is for a theme to say "Give me the system-default dark look for the chrome" (even if light is current) vs additionally "Hey, this is the color to use" (think VS blue theme). |
I tried |
|
And I noticed that your window border is not rounded, is there no problem with the graphics card driver? Or are rounded borders disabled or some visual effects? |
I am also curious. Visual Studio customized the title bar, but its "layout options" are still available. |
In addition, I have a suggestion. Currently, ILSpy has two themes, Light and Dark. Can we introduce an "Auto" mode? When the system theme changes, it automatically switches to the target mode. In WPF, we only need to subscribe to the SystemEvents.UserPreferenceChanged event. |
Yes, that's probably because its a VM, not a real machine, so my investigations here might not be fully valid. |
Can be fixed via #2955 |
Good point, but this would be a different issue. |
As of Windows 11 there is a possibility to change the color of the windows title bar.
"DWMWA_USE_IMMERSIVE_DARK_MODE" is supported starting with Windows 11 Build 22000.
learn.microsoft.com/en-us/windows/win32/api/dwmapi/nf-dwmapi-dwmsetwindowattribute
This could be used to let the title bar color follow the ILSpy color theme.
Also maybe an option could be using DWMWA_CAPTION_COLOR and DWMWA_TEXT_COLOR to set the colors explicit according to ILSpy them.
The text was updated successfully, but these errors were encountered: