mirror of
https://github.com/zen-browser/desktop.git
synced 2026-01-25 14:16:10 +00:00
chore: Update toolbar flash popup duration in compact mode
This commit is contained in:
@@ -73,7 +73,9 @@ pref('zen.theme.toolbar-themed', true);
|
||||
pref('zen.theme.pill-button', false);
|
||||
pref('zen.view.compact', false);
|
||||
pref('zen.view.compact.hide-toolbar', false);
|
||||
|
||||
pref('zen.view.compact.toolbar-flash-popup', true);
|
||||
pref('zen.view.compact.toolbar-flash-popup.duration', 1600);
|
||||
|
||||
pref('zen.view.sidebar-expanded', false);
|
||||
pref('zen.view.sidebar-expanded.on-hover', false);
|
||||
|
||||
@@ -29,7 +29,6 @@ var gZenUIManager = {
|
||||
|
||||
var gZenVerticalTabsManager = {
|
||||
init() {
|
||||
//Services.prefs.addObserver('zen.view.compact', this._updateEvent.bind(this));
|
||||
Services.prefs.addObserver('zen.view.sidebar-expanded', this._updateEvent.bind(this));
|
||||
Services.prefs.addObserver('zen.view.sidebar-expanded.max-width', this._updateEvent.bind(this));
|
||||
Services.prefs.addObserver('zen.view.sidebar-expanded.on-hover', this._updateOnHoverVerticalTabs.bind(this));
|
||||
@@ -114,6 +113,7 @@ var gZenCompactModeManager = {
|
||||
|
||||
init() {
|
||||
Services.prefs.addObserver('zen.view.compact', this._updateEvent.bind(this));
|
||||
Services.prefs.addObserver('zen.view.compact.toolbar-flash-popup.duration', this._updatedSidebarFlashDuration.bind(this));
|
||||
},
|
||||
|
||||
get prefefence() {
|
||||
@@ -132,11 +132,22 @@ var gZenCompactModeManager = {
|
||||
this.preference = !this.prefefence;
|
||||
},
|
||||
|
||||
_updatedSidebarFlashDuration() {
|
||||
this._flashSidebarDuration = Services.prefs.getIntPref('zen.view.compact.toolbar-flash-popup.duration');
|
||||
},
|
||||
|
||||
toggleSidebar() {
|
||||
let sidebar = document.getElementById('navigator-toolbox');
|
||||
sidebar.toggleAttribute('zen-user-show');
|
||||
},
|
||||
|
||||
get flashSidebarDuration() {
|
||||
if (this._flashSidebarDuration) {
|
||||
return this._flashSidebarDuration;
|
||||
}
|
||||
return Services.prefs.getIntPref('zen.view.compact.toolbar-flash-popup.duration');
|
||||
},
|
||||
|
||||
flashSidebar() {
|
||||
let sidebar = document.getElementById('navigator-toolbox');
|
||||
if (sidebar.matches(':hover')) {
|
||||
@@ -155,7 +166,7 @@ var gZenCompactModeManager = {
|
||||
sidebar.removeAttribute('flash-popup')
|
||||
this._flashSidebarTimeout = null;
|
||||
});
|
||||
}, 1600);
|
||||
}, this.flashSidebarDuration);
|
||||
},
|
||||
|
||||
toggleToolbar() {
|
||||
|
||||
Reference in New Issue
Block a user