diff --git a/addon/chrome/content/overlay/browser.css b/addon/chrome/content/overlay/browser.css index 7856b49c..6df1deef 100644 --- a/addon/chrome/content/overlay/browser.css +++ b/addon/chrome/content/overlay/browser.css @@ -255,10 +255,6 @@ so display: none !important; does not hide the button */ flex: 1 1 0% !important; } -#tabbrowser-tabs[orient="horizontal"]:not([widthFitTitle]) > #tabbrowser-arrowscrollbox > .tabbrowser-tab:not([pinned]) { - box-sizing: content-box; -} - /* we add #TabsToolbar to get higher specificity, in order to override Firefox rule */ #TabsToolbar #tabbrowser-tabs:not([overflow], [hashiddentabs], [showalltabsbutton]) ~ #alltabs-button { display: none; diff --git a/addon/chrome/content/overlay/browser_before_119.css b/addon/chrome/content/overlay/browser_before_119.css index ca6c99b1..b46f4571 100644 --- a/addon/chrome/content/overlay/browser_before_119.css +++ b/addon/chrome/content/overlay/browser_before_119.css @@ -254,10 +254,6 @@ so display: none !important; does not hide the button */ flex: 1 1 0% !important; } -#tabbrowser-tabs[orient="horizontal"]:not([widthFitTitle]) > #tabbrowser-arrowscrollbox > .tabbrowser-tab:not([pinned]) { - box-sizing: content-box; -} - /* we add #TabsToolbar to get higher specificity, in order to override Firefox rule */ #TabsToolbar #tabbrowser-tabs:not([overflow="true"], [hashiddentabs], [showalltabsbutton]) ~ #alltabs-button { display: none; diff --git a/addon/chrome/content/tab/tab.js b/addon/chrome/content/tab/tab.js index e1f1a4ff..de4401d5 100644 --- a/addon/chrome/content/tab/tab.js +++ b/addon/chrome/content/tab/tab.js @@ -638,9 +638,6 @@ Tabmix.tabsUtils = { } const firstNonPinnedTab = gBrowser.tabs[gBrowser._numPinnedTabs]; - const padding = firstNonPinnedTab ? - Tabmix.getStyle(firstNonPinnedTab, "paddingLeft") + Tabmix.getStyle(firstNonPinnedTab, "paddingRight") : - 4; /** * @param {number} stripWidth @@ -648,11 +645,11 @@ Tabmix.tabsUtils = { */ function calcMinWidth(stripWidth, buttonWidth, tabMinWidth = minWidth) { const widthWithoutButtons = stripWidth - buttonWidth; - const maxTabsInRow = Math.floor(stripWidth / (tabMinWidth + padding)); - const isTabsFit = maxTabsInRow * (tabMinWidth + padding) <= widthWithoutButtons; + const maxTabsInRow = Math.floor(stripWidth / tabMinWidth); + const isTabsFit = maxTabsInRow * tabMinWidth <= widthWithoutButtons; return isTabsFit ? tabMinWidth : - Math.floor((widthWithoutButtons - 1) / maxTabsInRow) - padding; + Math.floor((widthWithoutButtons - 1) / maxTabsInRow); } const tabsButtonWidth = this._newTabButtonWidth(false); @@ -907,10 +904,8 @@ Tabmix.tabsUtils = { const tsbo = this.tabBar.arrowScrollbox.scrollbox; const tsboBaseWidth = tsbo.getBoundingClientRect().width; const minWidth = parseFloat(gTMPprefObserver.dynamicRules.width.style.getPropertyValue("min-width")); - const tab = gBrowser.tabs.at(-1); - const padding = tab ? Tabmix.getStyle(tab, "paddingLeft") + Tabmix.getStyle(tab, "paddingRight") : 4; - const maxTabsInRow = Math.floor(tsboBaseWidth / (minWidth + padding)); - const newMaxWidth = Math.floor(1000 * tsboBaseWidth / maxTabsInRow) / 1000 - padding; + const maxTabsInRow = Math.floor(tsboBaseWidth / minWidth); + const newMaxWidth = Math.floor(1000 * tsboBaseWidth / maxTabsInRow) / 1000; if (this._tab_overflow_width !== newMaxWidth) { this._tab_overflow_width = newMaxWidth; const root = document.querySelector(":root");