Refactor CSS styles for zen components and update tab icon handling in ZenPinnedTabManager

This commit is contained in:
mr. M
2025-03-04 20:46:57 +01:00
parent 1c49cffc66
commit c78cafe605
5 changed files with 7 additions and 4 deletions

View File

@@ -34,7 +34,6 @@
margin-left: 0 !important;
position: absolute !important;
overflow: hidden;
transition: inset 0.1s;
}
#tabbrowser-tabpanels[zen-split-view='true']:not([zen-split-resizing]) > [zen-split-anim='true'] {

View File

@@ -121,7 +121,7 @@
&::before {
height: 50px;
width: 4px;
width: 2px;
background: var(--button-primary-bgcolor);
border-radius: 2px;
content: '';

View File

@@ -264,7 +264,7 @@
display: none;
}
&:active {
#tabbrowser-tabs:not([movingtab]) &:active {
scale: var(--zen-active-tab-scale);
}

View File

@@ -499,6 +499,7 @@
overflow: hidden;
text-overflow: ellipsis;
pointer-events: none;
font-size: small;
}
}

View File

@@ -84,7 +84,10 @@
onTabIconChanged(tab, url = null) {
const iconUrl = url ?? tab.iconImage.src;
if (tab.hasAttribute('zen-essential')) {
tab.querySelector('.tab-background').style.setProperty('--zen-tab-icon', `url(${iconUrl})`);
const pin = this._pinsCache.find((pin) => pin.uuid === tab.getAttribute('zen-pin-id'));
if (pin) {
tab.querySelector('.tab-background').style.setProperty('--zen-tab-icon', `url(${pin.iconUrl})`);
}
}
// TODO: work on this
//if (tab.hasAttribute('zen-pinned-changed') || !this._pinsCache) {