diff --git a/chrome/content/zotero/elements/itemPaneSidenav.js b/chrome/content/zotero/elements/itemPaneSidenav.js index 8bde7496da..6d4be2b178 100644 --- a/chrome/content/zotero/elements/itemPaneSidenav.js +++ b/chrome/content/zotero/elements/itemPaneSidenav.js @@ -608,6 +608,11 @@ // Keep in sync with _itemPaneSidenav.scss let btnSize = 28; let btnGap = 6; + let btnToggleSize = 42; + + let isStacked = this.classList.contains("stacked"); + let baseSize = isStacked ? 0 : btnToggleSize; + // Before the center of the button, insert before it; otherwise, insert after it. let index = 0; if (offset < btnSize / 2) { @@ -619,7 +624,7 @@ } return { index, - position: index === 0 ? 0 : index * (btnSize + btnGap) + btnGap / 2 + position: (index === 0 ? 0 : index * (btnSize + btnGap) + btnGap / 2) + baseSize }; };