Fix sidebar width in compact mode and add top buttons visibility fix

This commit is contained in:
mr. M
2024-12-16 23:16:23 +01:00
parent e31e18b3f3
commit 6c330fe4d2
4 changed files with 14 additions and 9 deletions

View File

@@ -107,7 +107,7 @@ var gZenCompactModeManager = {
// Do this so we can get the correct width ONCE compact mode styled have been applied
this.sidebar.setAttribute("animate", "true");
window.requestAnimationFrame(() => {
let sidebarWidth = Math.max(this.sidebar.getAttribute("width"), this.sidebar.getBoundingClientRect().width);
let sidebarWidth = this.sidebar.getBoundingClientRect().width;
if (canHideSidebar && isCompactMode) {
this.sidebar.style.position = "relative";
this.sidebar.style.transition = "margin .4s ease, opacity .4s ease";