mirror of
https://github.com/zen-browser/desktop.git
synced 2026-04-01 05:11:52 +00:00
feat: Improved scrolling and fixed identifying contrast on custom colors, b=bug #9185, c=common, workspaces
This commit is contained in:
@@ -1253,7 +1253,11 @@
|
||||
};
|
||||
|
||||
getMostDominantColor(allColors) {
|
||||
return this.getPrimaryColor(allColors);
|
||||
const color = this.getPrimaryColor(allColors);
|
||||
if (typeof color === 'string') {
|
||||
return this.hexToRgb(color);
|
||||
}
|
||||
return color;
|
||||
}
|
||||
|
||||
blendColors(rgb1, rgb2, percentage) {
|
||||
@@ -1629,8 +1633,8 @@
|
||||
const gradient = this.getGradient(workspace.theme.gradientColors);
|
||||
this.currentOpacity = previousOpacity;
|
||||
this.#currentLightness = previousLightness;
|
||||
this.#gradientsCache[uuid] = gradient;
|
||||
return gradient;
|
||||
this.#gradientsCache[uuid] = [gradient, workspace.theme.texture ?? 0];
|
||||
return this.#gradientsCache[uuid];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user