-
-
Notifications
You must be signed in to change notification settings - Fork 77
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
Dark Mode under Windows #197
Comments
I switched my Windows machine to Dark mode, and only some of the applications changed to Dark mode. In particular, most of the Windows tools, such as control panel property boxes remained to the default "light" mode. I suspect the registry setting and the windows message about the mode change is more an "advisory" setting. Applications built on .Net technologies will use it because the .Net libraries use it, but the Win32 controls don't. As such, if DrRacket (and the Racket GUI library) would like to implement Dark mode, it would either have to change to use the .Net GUI libraries, or do their own drawing of controls such as buttons, and consult the registry to determine if dark mode is enabled or not. |
Dark mode in the preferences of DrRacket may be the easy route to go ? |
It looks like there has been some movement in the Windows API documentation related to dark mode. Here's an article from the end of 2022: Support Dark and Light themes in Win32 apps. Currently the The article above seems to suggest using |
Would that be helpful? It depends on Windows versions
test :
|
Another uglier option: wrapping around PowerShell. I found this, but it doesn't work on my system. Maybe there's a way:
Ref: https://stackoverflow.com/questions/38734615/how-can-i-detect-windows-10-light-dark-mode |
Also, according to this, Visual Styles have to be enabled for GetThemeSysColor to work. |
Found the header file for the windows.ui.viewmanagement class for accessing UISettings, but for WinRT. |
Here's a hack that uses an undocumented dark mode API introduced in Windows 10 1809: https://github.com/ysc3839/win32-darkmode |
Another example in low(er) level C, using uxtheme.dll: Cheers |
I was reminded of this by a Discourse thread. I haven't thought about this in the last year, but I'll consolidate thoughts I had then into this issue. In #293 (comment) I wrote:
In #293 (comment) I wrote:
|
This issue has been mentioned on Racket Discourse. There might be relevant details there: https://racket.discourse.group/t/scope-and-purpose-of-racket-gui/2965/2 |
The OS-drawn controls aren't working properly when DrRacket is in dark mode.
This issue was created by culling the specific comments from racket/drracket#235.
@jcolivo wrote
@alex-hhh wrote
@mflatt wrote:
@jcolivo wrote
The text was updated successfully, but these errors were encountered: