fix: Fixed color scheme generation for linux, b=no-bug, c=folders, workspaces

This commit is contained in:
Mr. M
2025-08-19 01:38:15 +02:00
parent eb163dee88
commit 1e59e5d712
3 changed files with 10 additions and 5 deletions

View File

@@ -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%),

View File

@@ -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];
}
}

View File

@@ -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');
}