chore: Update tabs max-height calculation in ZenThemeModifier

This commit is contained in:
Mauro Balades
2024-07-20 00:38:04 +02:00
parent dddccee707
commit a4a1aa5c43

View File

@@ -151,10 +151,11 @@ var ZenThemeModifier = {
_updateTabsToolbar() { _updateTabsToolbar() {
// Set tabs max-height to the "toolbar-items" height // Set tabs max-height to the "toolbar-items" height
const toolbarItems = document.querySelector("#TabsToolbar > .toolbar-items"); const toolbarItems = document.getElementById("tabbrowser-tabs");
const tabs = document.getElementById("tabbrowser-arrowscrollbox"); const tabs = document.getElementById("tabbrowser-arrowscrollbox");
const toolbarRect = toolbarItems.getBoundingClientRect(); const toolbarRect = toolbarItems.getBoundingClientRect();
tabs.style.maxHeight = toolbarRect.height - toolbarRect.top + "px"; // -5 for the controls padding
tabs.style.maxHeight = toolbarRect.height - 5 + "px";
console.log("ZenThemeModifier: set tabs max-height to", toolbarRect.height + "px"); console.log("ZenThemeModifier: set tabs max-height to", toolbarRect.height + "px");
}, },