mirror of
https://github.com/zen-browser/desktop.git
synced 2025-07-08 00:10:00 +02:00
feat: Use primary color to deduce dark mode, b=no-bug, c=workspaces
This commit is contained in:
parent
87088d016c
commit
0735388cb1
1 changed files with 1 additions and 3 deletions
|
@ -1451,9 +1451,7 @@
|
||||||
let isDarkMode = this.isDarkMode;
|
let isDarkMode = this.isDarkMode;
|
||||||
if (!isDefaultTheme) {
|
if (!isDefaultTheme) {
|
||||||
// Check for the primary color
|
// Check for the primary color
|
||||||
isDarkMode = browser.gZenThemePicker.shouldBeDarkMode(
|
isDarkMode = browser.gZenThemePicker.shouldBeDarkMode(dominantColor);
|
||||||
workspaceTheme.gradientColors[0].c
|
|
||||||
);
|
|
||||||
browser.document.documentElement.setAttribute('zen-should-be-dark-mode', isDarkMode);
|
browser.document.documentElement.setAttribute('zen-should-be-dark-mode', isDarkMode);
|
||||||
} else {
|
} else {
|
||||||
browser.document.documentElement.removeAttribute('zen-should-be-dark-mode');
|
browser.document.documentElement.removeAttribute('zen-should-be-dark-mode');
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue