mirror of
https://github.com/zen-browser/desktop.git
synced 2026-02-05 19:37:22 +00:00
fix: Improved the way essentials are rendered, b=(no-bug), c=tabs, workspaces
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user