Skip to content

Commit e0bf7d0

Browse files
committed
feat: Apply tab icons when animating, b=(no-bug), c=workspaces
1 parent 12011c7 commit e0bf7d0

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/zen/workspaces/ZenWorkspaces.mjs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2134,6 +2134,21 @@ var gZenWorkspaces = new (class extends ZenMultiWindowFeature {
21342134
repeat: 0,
21352135
});
21362136
essentialsContainer.parentNode.appendChild(essentialsClone);
2137+
for (let i = 0; i < essentialsClone.children.length; i++) {
2138+
const child = essentialsClone.children[i];
2139+
const originalChild = essentialsContainer.children[i];
2140+
if (!gBrowser.isTab(child) || !gBrowser.isTab(originalChild)) {
2141+
continue;
2142+
}
2143+
const childBg = child.querySelector('.tab-background');
2144+
const originalChildBg = originalChild.querySelector('.tab-background');
2145+
if (childBg && originalChildBg) {
2146+
childBg.style.setProperty(
2147+
'--zen-tab-icon',
2148+
originalChildBg.style.getPropertyValue('--zen-tab-icon')
2149+
);
2150+
}
2151+
}
21372152
}
21382153
}
21392154
document.documentElement.setAttribute('animating-background', 'true');

0 commit comments

Comments
 (0)