fix: Collapsed mode spacings, glance splitting on an already split view and compact mode not setting a width on startup (closes https://github.com/zen-browser/desktop/issues/7239)

This commit is contained in:
mr. m
2025-04-03 12:41:58 +02:00
parent 5473afac23
commit f84e994b50
5 changed files with 10 additions and 4 deletions

View File

@@ -656,6 +656,7 @@ var gZenVerticalTabsManager = {
// Always move the splitter next to the sidebar
this.navigatorToolbox.after(document.getElementById('zen-sidebar-splitter'));
window.dispatchEvent(new Event('resize'));
gZenCompactModeManager.getAndApplySidebarWidth();
} catch (e) {
console.error(e);
}

View File

@@ -29,5 +29,9 @@ panel {
--panel-background: light-dark(rgba(255, 255, 255, 0.5), rgba(0, 0, 0, 0.5)) !important;
--panel-border-color: transparent !important;
--panel-shadow-margin: 0px !important;
&::part(content) {
animation: none !important;
}
}
}

View File

@@ -628,7 +628,7 @@
:root:not([zen-sidebar-expanded='true']) {
--tab-min-width: 36px !important;
--zen-toolbox-padding: calc(var(--zen-element-separation) / 2 + 1px);
--zen-toolbox-padding: 6px !important;
--zen-toolbox-max-width: calc(var(--tab-min-width) + var(--zen-toolbox-padding) * 2);
}

View File

@@ -36,7 +36,7 @@
case 'zen-glance-sidebar-close':
this.closeGlance({ onTabClose: true });
break;
case 'zen-glance-sidebar-fullscreen':
case 'zen-glance-sidebar-open':
this.fullyOpenGlance();
break;
case 'zen-glance-sidebar-split':
@@ -620,7 +620,7 @@
const currentParentTab = this.#currentParentTab;
await this.fullyOpenGlance({ forSplit: true });
gZenViewSplitter.splitTabs([currentTab, currentParentTab], 'vsep');
gZenViewSplitter.splitTabs([currentTab, currentParentTab], 'vsep', 1);
const browserContainer = currentTab.linkedBrowser?.closest('.browserSidebarContainer');
if (!gReduceMotion && browserContainer) {
gZenViewSplitter.animateBrowserDrop(browserContainer);

View File

@@ -963,8 +963,9 @@ class ZenViewSplitter extends ZenDOMOperatedFeature {
// Add any tabs that are not already in the group
for (let i = 0; i < tabs.length; i++) {
const tab = tabs[i];
if (!group.tabs.includes(tab) && tab.pinned === !!group.pinned) {
if (!group.tabs.includes(tab)) {
gBrowser.moveTabToGroup(tab, this._getSplitViewGroup(tabs));
group.tabs.push(tab);
this.addTabToSplit(tab, group.layoutTree);
}
}