mirror of
https://github.com/zen-browser/desktop.git
synced 2026-02-01 09:34:37 +00:00
fix: Fixed color scheme generation for linux, b=no-bug, c=folders, workspaces
This commit is contained in:
@@ -182,7 +182,7 @@ zen-folder {
|
||||
flex-direction: column;
|
||||
--zen-folder-behind-bgcolor: light-dark(
|
||||
color-mix(in srgb, var(--zen-primary-color) 85%, white),
|
||||
color-mix(in srgb, var(--zen-primary-color) 75%, black)
|
||||
color-mix(in srgb, var(--zen-primary-color) 60%, #c1c1c1)
|
||||
);
|
||||
--zen-folder-front-bgcolor: light-dark(
|
||||
color-mix(in srgb, var(--zen-primary-color), white 70%),
|
||||
|
||||
@@ -1504,7 +1504,7 @@
|
||||
const rgb = this.hexToRgb(accentColor);
|
||||
if (this.isDarkMode) {
|
||||
// If the theme is dark, we want to use a lighter color
|
||||
return this.blendColors(rgb, [0, 0, 0], 60);
|
||||
return this.blendColors(rgb, [0, 0, 0], 40);
|
||||
}
|
||||
return rgb;
|
||||
}
|
||||
@@ -1648,8 +1648,6 @@
|
||||
this.currentOpacity = theme.opacity ?? 0.5;
|
||||
this.#currentLightness = theme.lightness ?? 50;
|
||||
const gradient = this.getGradient(theme.gradientColors);
|
||||
this.currentOpacity = previousOpacity;
|
||||
this.#currentLightness = previousLightness;
|
||||
let dominantColor = this.getMostDominantColor(theme.gradientColors);
|
||||
const isDefaultTheme = !dominantColor;
|
||||
if (isDefaultTheme) {
|
||||
@@ -1670,6 +1668,8 @@
|
||||
toolbarColor: this.getToolbarColor(isDarkMode),
|
||||
primaryColor: this.getAccentColorForUI(dominantColor),
|
||||
};
|
||||
this.currentOpacity = previousOpacity;
|
||||
this.#currentLightness = previousLightness;
|
||||
return this.#gradientsCache[uuid];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -144,7 +144,8 @@
|
||||
|
||||
this.#updateOverflow();
|
||||
|
||||
window.addEventListener('ZenGradientCacheChanged', this.#onGradientCacheChanged.bind(this));
|
||||
this.onGradientCacheChanged = this.#onGradientCacheChanged.bind(this);
|
||||
window.addEventListener('ZenGradientCacheChanged', this.onGradientCacheChanged);
|
||||
|
||||
this.dispatchEvent(
|
||||
new CustomEvent('ZenWorkspaceAttached', {
|
||||
@@ -155,6 +156,10 @@
|
||||
);
|
||||
}
|
||||
|
||||
disconnectedCallback() {
|
||||
window.removeEventListener('ZenGradientCacheChanged', this.onGradientCacheChanged);
|
||||
}
|
||||
|
||||
get active() {
|
||||
return this.hasAttribute('active');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user