mirror of
https://github.com/zen-browser/desktop.git
synced 2025-09-05 19:08:18 +00:00
feat: Added an option to disable background tab toasts, b=(no-bug), c=common, compact-mode
This commit is contained in:
@@ -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);
|
||||
|
@@ -354,6 +354,7 @@ menuitem {
|
||||
translate: 100%;
|
||||
}
|
||||
|
||||
z-index: 1000;
|
||||
padding: 10px;
|
||||
border-radius: 12px;
|
||||
background: linear-gradient(
|
||||
|
@@ -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');
|
||||
}
|
||||
},
|
||||
|
Reference in New Issue
Block a user