1
0
Fork 1
mirror of https://github.com/zen-browser/desktop.git synced 2025-07-10 00:55:30 +02:00

Refactor tab overflow detection and adjust workspace initialization logic

This commit is contained in:
mr. M 2025-02-13 19:36:00 +01:00
parent 31ef8d2ec9
commit 855c36280b
No known key found for this signature in database
GPG key ID: CBD57A2AEDBDA1FB
2 changed files with 3 additions and 3 deletions

View file

@ -94,8 +94,8 @@
// Detect overflow and underflow // Detect overflow and underflow
const observer = new ResizeObserver((_) => { const observer = new ResizeObserver((_) => {
const tabContainer = gBrowser.tabContainer; const tabContainer = gBrowser.tabContainer;
const isVertical = tabContainer.getAttribute('orient') === 'vertical'; // const isVertical = tabContainer.getAttribute('orient') === 'vertical';
let contentSize = tabsWrapper.getBoundingClientRect()[isVertical ? 'height' : 'width']; // let contentSize = tabsWrapper.getBoundingClientRect()[isVertical ? 'height' : 'width'];
// NOTE: This should be contentSize > scrollClientSize, but due // NOTE: This should be contentSize > scrollClientSize, but due
// to how Gecko internally rounds in those cases, we allow for some // to how Gecko internally rounds in those cases, we allow for some
// minor differences (the internal Gecko layout size is 1/60th of a // minor differences (the internal Gecko layout size is 1/60th of a

View file

@ -526,7 +526,6 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
this.activeWorkspace = activeWorkspace?.uuid; this.activeWorkspace = activeWorkspace?.uuid;
} }
} }
await this.initializeTabsStripSections();
try { try {
if (activeWorkspace) { if (activeWorkspace) {
window.gZenThemePicker = new ZenThemePicker(); window.gZenThemePicker = new ZenThemePicker();
@ -535,6 +534,7 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
} catch (e) { } catch (e) {
console.error('ZenWorkspaces: Error initializing theme picker', e); console.error('ZenWorkspaces: Error initializing theme picker', e);
} }
await this.initializeTabsStripSections();
} }
} }