fix: Improved the way essentials are rendered, b=(no-bug), c=tabs, workspaces

This commit is contained in:
Mr. M
2025-04-29 19:58:47 +02:00
parent 79e731e89c
commit 8eec660d03
2 changed files with 4 additions and 12 deletions

View File

@@ -1250,15 +1250,9 @@
gap: calc(var(--zen-toolbox-padding) - 2px);
transition: max-height 0.3s ease-out;
opacity: 1;
grid-template-columns: repeat(auto-fit, minmax(49px, auto));
&[data-hack-type] {
&[data-hack-type='3'] {
--zen-hack-type: 3;
}
&[data-hack-type='4'] {
--zen-hack-type: 4;
}
grid-template-columns: repeat(auto-fit, minmax(calc(100% / var(--zen-hack-type) - 1%), auto));
grid-template-columns: repeat(auto-fit, minmax(48px, 1fr) minmax(48px, 1fr));
&[data-hack-type='3'] {
grid-template-columns: repeat(auto-fit, minmax(calc(100% / 3 - 1%), auto));
}
scrollbar-width: thin;
min-width: calc(100% + var(--zen-toolbox-padding) * 2);

View File

@@ -370,7 +370,7 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
}
let essentialsContainer = document.querySelector(`.zen-essentials-container[container="${container}"]:not([cloned])`);
if (!essentialsContainer) {
essentialsContainer = document.createXULElement('vbox');
essentialsContainer = document.createXULElement('hbox');
essentialsContainer.className = 'zen-essentials-container zen-workspace-tabs-section';
essentialsContainer.setAttribute('flex', '1');
essentialsContainer.setAttribute('container', container);
@@ -2390,8 +2390,6 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
let essentialHackType = 0;
if (essentialNumChildren % 3 === 0) {
essentialHackType = 3;
} else if (essentialNumChildren % 4 === 0 || essentialNumChildren % 4 === 3) {
essentialHackType = 4;
}
if (essentialHackType > 0) {
essentialContainer.setAttribute('data-hack-type', essentialHackType);