-
Notifications
You must be signed in to change notification settings - Fork 2.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
Default theme should be dark or light depending on OS preference #1189
Comments
Hmm. it's weird.
However, sample macos console app prints
Why chromium and sample app have different result? |
When |
@simonhong the implementation referred to in https://bugs.chromium.org/p/chromium/issues/detail?id=850098 also makes the changes to the code to tell the OS that it supports light / dark appearance modes and also changes the menu background color appropriately. Of course, ours will need to look at ActiveTheme, in case the user changes it. |
@bradleyrichter @rossmoody @bbondy @simonhong @rebron we need to re-think the preferences for light / dark mode again when we land OS appearance support, since there would now be multiple places that this configuration value can come from:
Once the user changes the Brave setting to Light / Dark (away from default) there is no UI for changing it back to track the OS value (as we removed 'Default' in brave/brave-core#774). So I propose either of the following: Option 1 - remove app-level user choice
Option 2 - more (confusing?) user-choice
Option 1 is simplest and seems to fit in with what other apps are doing (including Chromium), but since Settings is advanced anyway then I don't really mind which we go for. I would also, either way, suggest we consider removing the Channel-based defaults as I question the value: it is no longer a method of determining which channel a user is on since there are and will be many ways to change that. One downside to Option 2 is that to complicate matters, if we advertise to macOS that we support light / dark mode, but then allow the user to differ the window's dark / ligth appearance separate from the OS then macOS will apply incorrect native UI adornations, e.g. window border tint, context menu color. Brave has this issue right now - we get the light window highlight even when we change our colors to dark, since the OS thinks the Brave window is a regular 'light' window: |
+1 to Option 1. |
I think we should pending this implementation before upstream CLs are merged into C71. |
As I mentioned in #1289, you can override the system theme on macOS by using the API NSApplication.appearance. I just ran a quick test and confirmed that this works (my system setting is dark). Each time one of the checkboxes is toggled, NSApplication.appearance is set to a different value, and the window's appearance changes dynamically. |
@liunkae Yep, I already tested and I found #1189 (comment). Thanks for the testing ;) |
The Windows 10 version has not been fully implemented to the point that it is hidden behind a flag. Tested on
|
@kjozwiak not sure if this one can be marked as passed due to your testing on #1289 (comment) ? |
Yup, checked this case as well while going through #1289. Checked it one more time for this issue 👍 Verification PASSED on
|
Strangely this has stopped working since it has been implemented. Whenever the system changes its appearance (e.g. based on sunrise/sunset) Brave will just ignore this and stick with the previous theme. You have to manually switch to either dark or light theme in Brave settings and then reselect "Same as macOS" which will then finally make Brave pick up the correct theme. |
Back with some more info on this: seems that it only does not work when the system changes its theme while the device is sleeping (or locked?). Otherwise it works as expected. |
macOS Mojave and Windows 10 support dark vs light appearance themes. Brave should respond to those preferences and default to that OS-level preference, unless the user has explicitly chosen dark or light theme.
The text was updated successfully, but these errors were encountered: