From 8eec660d03c6a3be36a229d6d8df289c2b8b0f86 Mon Sep 17 00:00:00 2001 From: "Mr. M" Date: Tue, 29 Apr 2025 19:58:47 +0200 Subject: [PATCH] fix: Improved the way essentials are rendered, b=(no-bug), c=tabs, workspaces --- src/zen/tabs/zen-tabs/vertical-tabs.css | 12 +++--------- src/zen/workspaces/ZenWorkspaces.mjs | 4 +--- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/src/zen/tabs/zen-tabs/vertical-tabs.css b/src/zen/tabs/zen-tabs/vertical-tabs.css index 3d115ea73..c0217d85f 100644 --- a/src/zen/tabs/zen-tabs/vertical-tabs.css +++ b/src/zen/tabs/zen-tabs/vertical-tabs.css @@ -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); diff --git a/src/zen/workspaces/ZenWorkspaces.mjs b/src/zen/workspaces/ZenWorkspaces.mjs index fff326c49..d90a8cae9 100644 --- a/src/zen/workspaces/ZenWorkspaces.mjs +++ b/src/zen/workspaces/ZenWorkspaces.mjs @@ -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);