Set the application's dark mode to follow the app settings on macOS. #10177
+28
−4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi,
Last time I fixed the vibrancy issue on macOS: #9899
Somehow I still feel something strange in the vibrancy effect on macOS.
After some digging, I've found that the translucent effect of an Electron app's background on macOS is implemented by using NSVisualEffectView, which adapts to the system's dark mode setting in default—black in dark mode and white in light mode.
Tabby did not set the app-level dark mode configuration, so it defaults to following the system's dark mode setting.
As a result, when the macOS system dark mode is set to light, Tabby's dark theme background will mix with a white background, and appears washed out.
I updated the code to make Tabby's dark mode follow the app's internal settings, and dark themes look better.
I made two screenshots to show the difference with the following custom css:
The old code has the same effect with "always light"
The new code has a darker and more translucent(which appears) background:
I think we can ultimately achieve a near-transparent black glass like effect by configuring the material and opacity of the NSVisualEffectView, but Electron does not expose an interface for us to modify these parameters. Will try to dig further.