Refactor tab animations and update theme colors for improved UI consistency

This commit is contained in:
mr. M
2025-01-01 19:19:14 +01:00
parent d352fab5cd
commit 1d545c10c4
4 changed files with 18 additions and 13 deletions

View File

@@ -237,13 +237,13 @@
& .tabbrowser-tab {
transition: scale 0.07s ease;
&[fadein='true']:not([zen-essential='true']) {
#tabbrowser-tabs:not([dont-animate-tabs='true']) &[fadein='true']:not([zen-essential='true']) {
#tabbrowser-tabs[zen-workspace-animation='previous'] & {
animation: zen-slide-in 0.3s ease-out;
animation: zen-slide-in 0.3s ease;
}
#tabbrowser-tabs[zen-workspace-animation='next'] & {
animation: zen-slide-in-reverse 0.3s ease-out;
animation: zen-slide-in-reverse 0.3s ease;
}
}

View File

@@ -78,11 +78,12 @@
--button-background-color-active: var(--in-content-primary-button-background-active) !important;
--color-accent-primary: var(--button-primary-bgcolor) !important;
--color-accent-primary-hover: var(--zen-colors-primary-foreground) !important;
--color-accent-primary-hover: var(--button-primary-hover-bgcolor) !important;
--color-accent-primary-active: var(--button-primary-active-bgcolor) !important;
--link-color: var(--zen-branding-bg-reverse) !important;
--link-color-hover: var(--zen-branding-bg-reverse) !important;
--link-color-hover: var(--zen-colors-primary-foreground) !important;
--link-color-active: color-mix(in srgb, var(--zen-colors-primary-foreground) 80%, transparent 20%) !important;
--in-content-page-background: var(--zen-colors-tertiary) !important;
--zen-in-content-dialog-background: var(--zen-colors-tertiary);

View File

@@ -215,6 +215,14 @@
justify-content: space-between;
align-content: space-between;
max-height: 250px;
.workspace-icon-button {
min-width: 24px;
min-height: 24px;
font-size: 16px;
margin: 2px;
padding: 4px;
}
}
#PanelUI-zen-workspaces-list {
@@ -279,14 +287,6 @@
box-sizing: border-box;
}
.workspace-icon-button {
min-width: 24px;
min-height: 24px;
font-size: 16px;
margin: 2px;
padding: 4px;
}
#PanelUI-zen-workspaces-icon-search-input {
width: 100%;
padding: 8px 12px;

View File

@@ -1320,6 +1320,7 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
const visibleTabs = new Set();
const lastSelectedTab = this._lastSelectedWorkspaceTabs[workspaceUuid];
this.tabContainer.setAttribute('dont-animate-tabs', 'true');
for (const tab of gBrowser.tabs) {
const tabWorkspaceId = tab.getAttribute('zen-workspace-id');
const isEssential = tab.getAttribute("zen-essential") === "true";
@@ -1343,6 +1344,9 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
gBrowser.hideTab(tab, undefined, true);
}
}
window.requestAnimationFrame(() => {
this.tabContainer.removeAttribute('dont-animate-tabs');
});
return visibleTabs;
}