Bug 1725468 - Add prototype monochromatic theme for UX iteration. r=Gijs,amy

Differential Revision: https://phabricator.services.mozilla.com/D122515
This commit is contained in:
Harry Twyford
2021-08-18 13:13:38 +00:00
parent 795d5635ff
commit 831ee727ef
8 changed files with 175 additions and 0 deletions

View File

@@ -88,6 +88,8 @@ const DEFAULT_THEME_ID = "default-theme@mozilla.org";
const LIGHT_THEME_ID = "firefox-compact-light@mozilla.org";
const DARK_THEME_ID = "firefox-compact-dark@mozilla.org";
const ALPENGLOW_THEME_ID = "firefox-alpenglow@mozilla.org";
const MONOCHROMATIC_PURPLE_THEME_ID =
"firefox-monochromatic-purple@mozilla.org";
const _defaultImportantThemes = [
DEFAULT_THEME_ID,
@@ -1584,6 +1586,14 @@ CustomizeMode.prototype = {
// Move the current theme (if any) and the default themes to the start:
let importantThemes = new Set(_defaultImportantThemes);
if (
Services.prefs.getBoolPref(
"browser.theme.temporary.monochromatic.enabled",
false
)
) {
importantThemes.add(MONOCHROMATIC_PURPLE_THEME_ID);
}
if (currentTheme) {
importantThemes.add(currentTheme.id);
}