Added different transparency modes for macos and stopped initializing workspaces on closed windows

This commit is contained in:
mr. m
2025-02-27 19:06:50 +01:00
parent 7585514868
commit a409016f7a
5 changed files with 66 additions and 20 deletions

View File

@@ -370,6 +370,14 @@ pref('browser.download.autohideButton', false);
// Enable transparent background for macos
#ifdef XP_MACOSX
pref('widget.macos.titlebar-blend-mode.behind-window', true);
// 1. hudWindow
// 2. fullScreenUI
// 3. popover
// 4. menu
// 5. toolTip
// 6. headerView
// 7. underlay
pref('zen.widget.macos.window-material', 7);
#endif
// Urlbar and autocomplete

View File

@@ -190,14 +190,16 @@ var gZenCompactModeManager = {
}
)
.then(() => {
this.sidebar.removeAttribute('animate');
this.sidebar.style.removeProperty('margin-right');
this.sidebar.style.removeProperty('margin-left');
this.sidebar.style.removeProperty('transform');
this.sidebar.style.transition = 'none';
setTimeout(() => {
this._animating = false;
this.sidebar.style.removeProperty('transition');
window.requestAnimationFrame(() => {
this.sidebar.removeAttribute('animate');
this.sidebar.style.removeProperty('margin-right');
this.sidebar.style.removeProperty('margin-left');
this.sidebar.style.removeProperty('transform');
this.sidebar.style.transition = 'none';
setTimeout(() => {
this._animating = false;
this.sidebar.style.removeProperty('transition');
});
});
});
} else if (canHideSidebar && !isCompactMode) {

View File

@@ -512,9 +512,8 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
if (typeof this._workspaceEnabled === 'undefined') {
this._workspaceEnabled =
!Services.prefs.getBoolPref('zen.workspaces.disabled_for_testing', false) && this.shouldHaveWorkspaces;
return this._workspaceEnabled;
}
return this._workspaceEnabled;
return this._workspaceEnabled && !window.closed;
}
getActiveWorkspaceFromCache() {
@@ -591,6 +590,7 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
console.error('ZenWorkspaces: Error initializing theme picker', e);
}
this._selectStartPage();
this._fixTabPositions();
}
}
@@ -1538,10 +1538,7 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
}
_moveEmptyTabToWorkspace(workspaceUuid) {
const emptyTab = this._emptyTab;
if (emptyTab) {
this.moveTabToWorkspace(emptyTab, workspaceUuid);
}
this._makeSureEmptyTabIsLast();
}
_makeSureEmptyTabIsLast() {
@@ -1552,6 +1549,15 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
container.insertBefore(emptyTab, container.lastChild);
}
}
this._fixTabPositions();
}
_fixTabPositions() {
// Fix tabs _tPos values relative to the actual order
const tabs = gBrowser.tabs;
for (let i = 0; i < tabs.length; i++) {
tabs[i]._tPos = i;
}
}
_updateMarginTopPinnedTabs(arrowscrollbox, pinnedContainer) {