gh-15438: Fix library compact mode offset (gh-15504)

This commit is contained in:
fen4flo
2026-09-21 20:00:10 +02:00
committed by GitHub
parent e68b5e5c26
commit f0f21cdade
+4 -3
View File
@@ -143,8 +143,8 @@ export class ZenLibrary extends MozLitElement {
let libraryWidth =
window.windowUtils.getBoundsWithoutFlushing(this).width;
const compactModeOffsetDirection = this.#libraryOnRight
? -this.#toolboxWidth
: this.#toolboxWidth;
? -this.#toolboxWidth + ZenThemeModifier.elementSeparation
: this.#toolboxWidth - ZenThemeModifier.elementSeparation;
const compactModeOffset = this.#isCompactMode
? compactModeOffsetDirection
: 0;
@@ -463,9 +463,10 @@ export class ZenLibrary extends MozLitElement {
.replace("/\D/g", "")
);
if (document.documentElement.hasAttribute("zen-sidebar-expanded")) {
this.#toolboxWidth += window.windowUtils.getBoundsWithoutFlushing(
const splitterWidth = window.windowUtils.getBoundsWithoutFlushing(
document.getElementById("zen-sidebar-splitter")
).width;
this.#toolboxWidth += splitterWidth;
}
}