mirror of
https://github.com/zen-browser/desktop.git
synced 2025-10-03 16:36:35 +00:00
Refactor _updateEvent parameters for customizable mode handling
This commit is contained in:
@@ -208,7 +208,7 @@ var gZenVerticalTabsManager = {
|
|||||||
|
|
||||||
async _preCustomize() {
|
async _preCustomize() {
|
||||||
await this._multiWindowFeature.foreachWindowAsActive(async (browser) => {
|
await this._multiWindowFeature.foreachWindowAsActive(async (browser) => {
|
||||||
browser.gZenVerticalTabsManager._updateEvent({ forceMultipleToolbar: true, dontRebuildAreas: true });
|
browser.gZenVerticalTabsManager._updateEvent({ forCustomizableMode: true, dontRebuildAreas: true });
|
||||||
});
|
});
|
||||||
this.rebuildAreas();
|
this.rebuildAreas();
|
||||||
this.navigatorToolbox.setAttribute('zen-sidebar-expanded', 'true');
|
this.navigatorToolbox.setAttribute('zen-sidebar-expanded', 'true');
|
||||||
@@ -268,7 +268,7 @@ var gZenVerticalTabsManager = {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
||||||
_updateEvent({ forceMultipleToolbar = false, dontRebuildAreas = false } = {}) {
|
_updateEvent({ forCustomizableMode = false, dontRebuildAreas = false } = {}) {
|
||||||
if (this._isUpdating) {
|
if (this._isUpdating) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -282,11 +282,11 @@ var gZenVerticalTabsManager = {
|
|||||||
.rollupAllPopups();
|
.rollupAllPopups();
|
||||||
|
|
||||||
const topButtons = document.getElementById('zen-sidebar-top-buttons');
|
const topButtons = document.getElementById('zen-sidebar-top-buttons');
|
||||||
const isCompactMode = this._prefsCompactMode;
|
const isCompactMode = this._prefsCompactMode && !forCustomizableMode;
|
||||||
const isVerticalTabs = this._prefsVerticalTabs || forceMultipleToolbar;
|
const isVerticalTabs = this._prefsVerticalTabs || forCustomizableMode;
|
||||||
const isSidebarExpanded = this._prefsSidebarExpanded || !isVerticalTabs;
|
const isSidebarExpanded = this._prefsSidebarExpanded || !isVerticalTabs;
|
||||||
const isRightSide = this._prefsRightSide && isVerticalTabs;
|
const isRightSide = this._prefsRightSide && isVerticalTabs;
|
||||||
const isSingleToolbar = ((this._prefsUseSingleToolbar && (isVerticalTabs && isSidebarExpanded) )|| !isVerticalTabs) && !forceMultipleToolbar && !this.hidesTabsToolbar;
|
const isSingleToolbar = ((this._prefsUseSingleToolbar && (isVerticalTabs && isSidebarExpanded) )|| !isVerticalTabs) && !forCustomizableMode && !this.hidesTabsToolbar;
|
||||||
const titlebar = document.getElementById('titlebar');
|
const titlebar = document.getElementById('titlebar');
|
||||||
|
|
||||||
gBrowser.tabContainer.setAttribute('orient', isVerticalTabs ? 'vertical' : 'horizontal');
|
gBrowser.tabContainer.setAttribute('orient', isVerticalTabs ? 'vertical' : 'horizontal');
|
||||||
|
Reference in New Issue
Block a user