-
Notifications
You must be signed in to change notification settings - Fork 504
Add Dark Mode support for Windows #6666
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
base: master
Are you sure you want to change the base?
Conversation
790880a to
d0a5c6f
Compare
|
Nice PR number for such a change, btw |
For Windows use |
|
|
Yes, it looks like this is really better. Good catch! |
| // wxWidgets' IsDark() returns false on Win 11 now even if dark mode is enabled | ||
| // so we need to additionally check the registry for the dark mode setting | ||
| m_isDarkMode = m_isDarkMode || IsWindowsInDarkMode(); | ||
| MSWEnableDarkMode(wxApp::DarkMode_Auto); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure this is needed? I do remember when I tested the dark mode, I didn't have this enabled
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did it according to docs. Yes, without it just ignores OS settings
|
@AufarZakiev @AenBleidd Please make absolutely sure that all your changes are guarded by |
or |
|
@CharlieFenton, of course we will, no worries. This is too far from being finished, and it's too early to talk about this now, but this is definitely something I will keep in mind while doing a review of the code. |
d0a5c6f to
6f72d16
Compare
6f72d16 to
83f4cf0
Compare
|
@AenBleidd , do you have a chance to review PR? |
|
I had no chance to test this on devices I have. |
|
@AufarZakiev, we have a progress bar that has a self-written function to draw itself. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are you changing all these colors? The contents of the graphs do not need to be changed for dark mode. In my opinion, it is wrong to change them. Furthermore, you have not guarded your changes by #ifdef _WIN32 or #ifdef __WXMSW__ to prevent creating problems for Mac and Linux. This file already had all the changes needed for dark mode. Here is how the light and dark mode appear on the Mac with the existing code:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@CharlieFenton, maybe we still can change these colors to be less bright when in Dark mode?
Personally I think with this change they look (at least on Windows) way more consistent than on macOS:

There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the screenshot. Now that I've seen it, I feel even more certain that the changes in this PR are wrong. It looks terrible and it is very difficult to see the grid lines. You can do what you want on Windows, but please do not change the appearance on the Mac. The BOINC dark mode has been available on the Mac for quite some time, and people have been happy with it as is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be better to have the same look and feel on all platforms. Maybe we can adjust the intensity of the grid lines to make them more visible while keeping more dark background?
@davidpanderson, what do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are making wholesale changes affecting all platforms, including Mac and Linux. This is unacceptable. You must take care not to change anything affecting the Mac by guarding your changes with #ifdef _WIN32 or #ifdef __WXMSW__
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please note also that on MS Windows, BOINC uses the native list control, but on Mac and Linux it uses wxWidgets' wxGenericListCtrl built from wxWidgets source code.
|
I agree that, in dark mode, the background of the graphs should be fairly dark |
|
I think it is worthwhile to take a step back and look at what Microsoft and Apple say about Dark Mode. This article from Microsoft says:
I've seen some websites say Reduce eyestrain rather than Easier on the eyes. I think that is primarily about reducing the glare that comes from black letters on a white background. It's pretty clear to me that Dark mode doesn't necessarily involve inverting all colors. If you scroll down a bit in this section of this microsoft article you can see that a color quite similar to our graph background is unchanged in dark mode. When I asked Google for Microsoft dark mode programming guidelines it replied:
and
Another important consideration I see mentioned in the above articles and various others is accessibility. Contrast among elements must be high enough to help people with impaired vision understand the display. That means the grid lines must be more prominent than the screenshot from this PR. I feel the pale blue background we have in Light Mode also works well in Dark Mode and allows the grid lines and data to be easily visible without causing eye strain or glare. I am willing to consider using the colors that we settle on for Windows in the statistics tab on the Mac if they are pleasing (aesthetic preference) and satisfy all the other considerations discussed above. But I feel the current proposal does not meet those criteria. Finally, please remember that BOINC has supported Dark Mode on the Mac since June 2023 and the current implementation has been very well received. |
That doesn't mean that it's perfect and cannot be made better ;)
True, but the color itself is a little bit more soft and darker in comparison with the color we have in BOINC Manager. But I do agree. I do not want to say that the set of colors in this PR is the final. This needs to be further discussed to find better colors for the next try. |
|
@CharlieFenton, some examples of graphics from GitHub I personally like: Again, need to be further discussed. |
|
One more example of nice graphs: https://grafana.kiska.pw/d/boinc/boinc?orgId=1&var-project=BOINC%20Central&from=now-24h&to=now |


Fixes #5274
Description of the Change
Note: wxWidgets' IsDark() returns
falseon Win 11 now even if dark mode is enabled. Therefore, registry reading mechanism was introduced as an additional checkTested on Win 11.
Alternate Designs
Screenshots:
Release Notes
Add Dark Mode support for Windows