feat: Improved theme handling for single workspaces, b=no-bug, c=tabs, folders, workspaces

This commit is contained in:
Mr. M
2025-08-14 12:54:11 +02:00
parent 942606f82b
commit c779267486
7 changed files with 65 additions and 108 deletions

View File

@@ -1719,9 +1719,9 @@ var gZenWorkspaces = new (class extends nsZenMultiWindowFeature {
// Find the next workspace we are scrolling to
const nextWorkspace = workspaces.workspaces[workspaceIndex + (offsetPixels > 0 ? -1 : 1)];
if (nextWorkspace) {
const [nextGradient, nextGrain] =
await gZenThemePicker.getGradientForWorkspace(nextWorkspace);
const existingGrain = (await gZenThemePicker.getGradientForWorkspace(workspace))[1];
const { gradient: nextGradient, grain: nextGrain } =
gZenThemePicker.getGradientForWorkspace(nextWorkspace);
const existingGrain = gZenThemePicker.getGradientForWorkspace(workspace).grain;
const percentage = Math.abs(offsetPixels) / 200;
await new Promise((resolve) => {
requestAnimationFrame(() => {