fix: Fixed compact mode not resizing properly, b=(no-bug), c=compact-mode

This commit is contained in:
Mr. M
2025-05-04 22:01:30 +02:00
parent f75e74b678
commit 05df28ae72
2 changed files with 15 additions and 18 deletions

View File

@@ -110,11 +110,7 @@ pref('zen.injections.match-urls', 'http://localhost/*', locked);
#endif
pref('zen.rice.share.notice.accepted', false);
#ifdef XP_MACOSX
pref('zen.theme.border-radius', 10); // In pixels
#else
pref('zen.theme.border-radius', 8); // In pixels
#endif
pref('zen.theme.color-prefs.use-workspace-colors', true);

View File

@@ -246,30 +246,31 @@ var gZenCompactModeManager = {
}
)
.then(() => {
if (gZenUIManager._hasSetSingleToolbar) {
gURLBar.textbox.style.visibility = 'visible';
}
this.sidebar.style.transition = 'none';
this.sidebar.style.pointEvents = 'none';
const titlebar = document.getElementById('titlebar');
titlebar.style.visibility = 'hidden';
titlebar.style.transition = 'none';
this.sidebar.removeAttribute('animate');
document.documentElement.removeAttribute('zen-compact-animating');
this.getAndApplySidebarWidth({});
this._ignoreNextResize = true;
setTimeout(() => {
this.sidebar.style.removeProperty('margin-right');
this.sidebar.style.removeProperty('margin-left');
this.sidebar.style.removeProperty('transition');
this.sidebar.style.removeProperty('transform');
this.getAndApplySidebarWidth({});
this._ignoreNextResize = true;
titlebar.style.removeProperty('visibility');
titlebar.style.removeProperty('transition');
setTimeout(() => {
this.sidebar.style.removeProperty('margin-right');
this.sidebar.style.removeProperty('margin-left');
this.sidebar.style.removeProperty('transition');
this.sidebar.style.removeProperty('transform');
this.sidebar.style.removeProperty('point-events');
gURLBar.textbox.style.removeProperty('visibility');
resolve();
titlebar.style.removeProperty('visibility');
titlebar.style.removeProperty('transition');
gURLBar.textbox.style.removeProperty('visibility');
resolve();
});
});
});
} else if (canHideSidebar && !isCompactMode) {