mirror of
https://github.com/zen-browser/desktop.git
synced 2025-10-15 06:16:14 +00:00
fix(ZenCompactMode): refactor URL height recalculation to use dedicated method in ZenVerticalTabsManager
This commit is contained in:
@@ -464,6 +464,19 @@ var gZenVerticalTabsManager = {
|
||||
}
|
||||
},
|
||||
|
||||
recalculateURLBarHeight() {
|
||||
document.getElementById('urlbar').removeAttribute('--urlbar-height');
|
||||
if (!this._hasSetSingleToolbar) {
|
||||
document.getElementById('urlbar').style.setProperty('--urlbar-height', '32px');
|
||||
} else {
|
||||
try {
|
||||
gURLBar.zenUpdateLayoutBreakout();
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
_updateEvent({ forCustomizableMode = false, dontRebuildAreas = false } = {}) {
|
||||
if (this._isUpdating) {
|
||||
return;
|
||||
@@ -642,16 +655,7 @@ var gZenVerticalTabsManager = {
|
||||
}
|
||||
|
||||
gZenCompactModeManager.updateCompactModeContext(isSingleToolbar);
|
||||
document.getElementById('urlbar').removeAttribute('--urlbar-height');
|
||||
if (!isSingleToolbar) {
|
||||
document.getElementById('urlbar').style.setProperty('--urlbar-height', '32px');
|
||||
} else {
|
||||
try {
|
||||
gURLBar.zenUpdateLayoutBreakout();
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
}
|
||||
}
|
||||
this.recalculateURLBarHeight();
|
||||
|
||||
// Always move the splitter next to the sidebar
|
||||
this.navigatorToolbox.after(document.getElementById('zen-sidebar-splitter'));
|
||||
|
Reference in New Issue
Block a user