Refactor tab management and update CSS for improved layout and performance

This commit is contained in:
mr. M
2025-02-13 19:17:20 +01:00
parent a5ae4077cf
commit 31ef8d2ec9
4 changed files with 27 additions and 17 deletions

View File

@@ -35,7 +35,7 @@ var gZenUIManager = {
updateTabsToolbar() {
// Set tabs max-height to the "toolbar-items" height
const tabs = document.getElementById('zen-browser-tabs-wrapper');
const tabs = this.tabsWrapper;
// Remove tabs so we can accurately calculate the height
// without them affecting the height of the toolbar
for (const tab of gBrowser.tabs) {
@@ -414,7 +414,10 @@ var gZenVerticalTabsManager = {
gBrowser.tabContainer.setAttribute('orient', isVerticalTabs ? 'vertical' : 'horizontal');
gBrowser.tabContainer.arrowScrollbox.setAttribute('orient', isVerticalTabs ? 'vertical' : 'horizontal');
// on purpose, we set the orient to horizontal, because the arrowScrollbox is vertical
gBrowser.tabContainer.arrowScrollbox.scrollbox.setAttribute('orient', (isVerticalTabs && ZenWorkspaces.workspaceEnabled) ? 'horizontal' : 'vertical');
gBrowser.tabContainer.arrowScrollbox.scrollbox.setAttribute(
'orient',
isVerticalTabs && ZenWorkspaces.workspaceEnabled ? 'horizontal' : 'vertical'
);
const buttonsTarget = document.getElementById('zen-sidebar-top-buttons-customization-target');
if (isRightSide) {