feat: Added an option to disable background tab toasts, b=(no-bug), c=common, compact-mode

This commit is contained in:
mr. m
2025-05-09 08:18:17 +02:00
parent e079732686
commit 7a00f3c67c
3 changed files with 5 additions and 1 deletions

View File

@@ -45,6 +45,7 @@ pref('zen.view.compact.color-toolbar', true);
pref('zen.view.compact.color-sidebar', true);
pref('zen.view.compact.animate-sidebar', true);
pref('zen.view.compact.show-sidebar-and-toolbar-on-hover', true);
pref('zen.view.compact.show-background-tab-toast', false);
pref('zen.urlbar.replace-newtab', true);
pref('zen.urlbar.show-protections-icon', false);

View File

@@ -354,6 +354,7 @@ menuitem {
translate: 100%;
}
z-index: 1000;
padding: 10px;
border-radius: 12px;
background: linear-gradient(

View File

@@ -49,6 +49,8 @@ var gZenCompactModeManager = {
// Clear hover states when window state changes (minimize, maximize, etc.)
window.addEventListener('sizemodechange', () => this._clearAllHoverStates());
this._canShowBackgroundTabToast = Services.prefs.getBoolPref('zen.view.compact.show-background-tab-toast', true);
if (AppConstants.platform == 'macosx') {
window.addEventListener('mouseover', (event) => {
const buttons = gZenVerticalTabsManager.actualWindowButtons;
@@ -558,7 +560,7 @@ var gZenCompactModeManager = {
},
async _onTabOpen(tab, inBackground) {
if (inBackground && this.preference && !this.isSidebarPotentiallyOpen()) {
if (inBackground && this.preference && !this.isSidebarPotentiallyOpen() && this._canShowBackgroundTabToast) {
gZenUIManager.showToast('zen-background-tab-opened-toast');
}
},