diff --git a/.github/workflows/windows-alpha-build.yml b/.github/workflows/windows-alpha-build.yml
index 0845035e8..db0e5969e 100644
--- a/.github/workflows/windows-alpha-build.yml
+++ b/.github/workflows/windows-alpha-build.yml
@@ -212,6 +212,7 @@ jobs:
path: ./zen.win64-pgo-stage-1.zip
- name: Upload dist folder to github
+ if: ${{ !inputs.generate-gpo }}
run: |
set -x
git pull
diff --git a/l10n b/l10n
index 530f0c018..0e976aef3 160000
--- a/l10n
+++ b/l10n
@@ -1 +1 @@
-Subproject commit 530f0c018cb6ca3044cc067720ce1133dac55e4b
+Subproject commit 0e976aef37a43262a464495d473ceaff5038cab4
diff --git a/src/browser/base/content/zen-styles/zen-browser-ui.css b/src/browser/base/content/zen-styles/zen-browser-ui.css
index 4eec93b59..5a98d9605 100644
--- a/src/browser/base/content/zen-styles/zen-browser-ui.css
+++ b/src/browser/base/content/zen-styles/zen-browser-ui.css
@@ -36,27 +36,4 @@
#tabbrowser-tabbox {
display: flex;
flex-direction: row;
-}
-
-/* Notification Stack */
-
-.notificationbox-stack {
-
- &[notificationside="top"] {
- position: absolute;
- bottom: 0;
- right: 0;
- width: fit-content;
- max-width: 30rem !important;
-
- & notification-message {
- background: var(--zen-colors-tertiary);
- border-left: 1px solid var(--arrowpanel-border-color);
- border-top-left-radius: var(--zen-border-radius);
-
- &::before {
- display: none;
- }
- }
- }
}
\ No newline at end of file
diff --git a/src/browser/base/content/zen-styles/zen-theme.css b/src/browser/base/content/zen-styles/zen-theme.css
index fbe3f4451..8f5adb2ca 100644
--- a/src/browser/base/content/zen-styles/zen-theme.css
+++ b/src/browser/base/content/zen-styles/zen-theme.css
@@ -132,6 +132,36 @@
}
}
+@media (prefers-color-scheme: dark) {
+ @media (-moz-bool-pref: 'zen.theme.color-prefs.amoled') {
+ :root {
+ --zen-dark-color-mix-base: lch(2.467% 0 272 / 1);
+ --zen-urlbar-background: color-mix(in srgb, var(--zen-primary-color) 4%, rgb(0, 0, 0) 96%);
+ }
+ }
+
+ @media (-moz-bool-pref: 'zen.theme.color-prefs.colorful') {
+ :root {
+ --zen-in-content-dialog-background: rgb(28, 28, 32);
+
+ --zen-colors-primary: color-mix(in srgb, var(--zen-primary-color) 50%, black 50%);
+ --zen-colors-secondary: color-mix(in srgb, var(--zen-primary-color) 40%, black 60%);
+ --zen-colors-tertiary: color-mix(in srgb, var(--zen-primary-color) 15%, black 85%);
+
+ --zen-colors-hover-bg: color-mix(in srgb, var(--zen-primary-color) 90%, black 10%);
+ --zen-colors-primary-foreground: color-mix(in srgb, var(--zen-primary-color) 80%, white 20%);
+
+ --zen-colors-input-bg: color-mix(in srgb, var(--zen-primary-color) 10%, black 80%);
+ --zen-colors-border: color-mix(in srgb, var(--zen-colors-secondary) 80%, black 20%);
+
+ --zen-dialog-background: color-mix(in srgb, var(--zen-primary-color) 10%, black 90%);
+ --zen-urlbar-background: color-mix(in srgb, var(--zen-primary-color) 8%, rgb(15, 15, 15) 92%);
+
+ --zen-browser-gradient-base: color-mix(in srgb, var(--zen-primary-color) 30%, black 70%);
+ }
+ }
+}
+
@media not (-moz-bool-pref: 'zen.theme.toolbar-themed') {
:root {
--toolbar-bgcolor: light-dark(white, #1b1b1b) !important;
diff --git a/src/browser/base/content/zen-styles/zen-urlbar.css b/src/browser/base/content/zen-styles/zen-urlbar.css
index df4cf3ba1..3fd892b2c 100644
--- a/src/browser/base/content/zen-styles/zen-urlbar.css
+++ b/src/browser/base/content/zen-styles/zen-urlbar.css
@@ -1,12 +1,12 @@
/* URL and tool bars */
#urlbar {
- --toolbarbutton-border-radius: 6px;
+ --toolbarbutton-border-radius: 10px;
--urlbarView-separator-color: var(--zen-colors-border);
--urlbarView-hover-background: var(--toolbarbutton-hover-background);
--urlbarView-highlight-background: var(--toolbarbutton-hover-background);
border: 1px solid var(--zen-colors-border);
- border-radius: 999px;
+ border-radius: var(--toolbarbutton-border-radius);
overflow: hidden;
padding: 1px;
}
@@ -38,10 +38,13 @@
outline-color: none !important;
}
-#urlbar .urlbar-page-action,
#urlbar #tracking-protection-icon-container,
#urlbar:not([breakout-extend='true']) #identity-box:is(:not(.chromeUI), [pageproxystate='invalid']) #identity-icon-box {
- border-radius: 999px;
+ border-radius: var(--toolbarbutton-border-radius);
+}
+
+#urlbar .urlbar-page-action {
+ border-radius: calc(var(--toolbarbutton-border-radius) / 1.5);
}
#urlbar[breakout-extend='true'] .urlbar-page-action,
@@ -57,7 +60,7 @@
#identity-icon-box,
#identity-permission-box {
- background: var(--zen-colors-secondary) !important;
+ background: color-mix(in srgb, var(--zen-colors-secondary) 40%, transparent 60%) !important;
margin: 0 8px 0 0 !important;
}
@@ -78,10 +81,6 @@
margin-right: 0 !important;
}
-#urlbar:not([breakout-extend='true']) #identity-box.chromeUI:not([pageproxystate='invalid']) #identity-icon-box {
- border-radius: 20px 10px 10px 20px !important;
-}
-
#urlbar:not([extend='true']) #identity-box #identity-icon-box {
position: relative;
}
@@ -222,3 +221,27 @@ button.popup-notification-dropmarker {
}
}
}
+
+
+/* Notification Stack */
+
+.notificationbox-stack {
+
+ &[notificationside="top"] {
+ position: absolute;
+ bottom: 0;
+ right: 0;
+ width: fit-content;
+ max-width: 30rem !important;
+
+ & notification-message {
+ background: var(--zen-colors-tertiary);
+ border-left: 1px solid var(--arrowpanel-border-color);
+ border-top-left-radius: var(--zen-border-radius);
+
+ &::before {
+ display: none;
+ }
+ }
+ }
+}
diff --git a/src/browser/components/preferences/main-inc-xhtml.patch b/src/browser/components/preferences/main-inc-xhtml.patch
index 92cfd70d0..a95812404 100644
--- a/src/browser/components/preferences/main-inc-xhtml.patch
+++ b/src/browser/components/preferences/main-inc-xhtml.patch
@@ -1,7 +1,16 @@
diff --git a/browser/components/preferences/main.inc.xhtml b/browser/components/preferences/main.inc.xhtml
-index 4c2637db10b7ad5d253d9588be3610c1ec5ad330..b8445b808cf9dcb54d380ae78172db4bf8250cd4 100644
+index 4c2637db10b7ad5d253d9588be3610c1ec5ad330..b7861f7888b0d3f9abd5249f8356e6b9b5c3005f 100644
--- a/browser/components/preferences/main.inc.xhtml
+++ b/browser/components/preferences/main.inc.xhtml
+@@ -163,7 +163,7 @@
+
+
+
+-
++
+
+
+
@@ -369,6 +369,7 @@
languages-customize-add.label,
" />
diff --git a/src/browser/components/preferences/zen-settings.js b/src/browser/components/preferences/zen-settings.js
index 9f35eba53..965407b0c 100644
--- a/src/browser/components/preferences/zen-settings.js
+++ b/src/browser/components/preferences/zen-settings.js
@@ -216,6 +216,8 @@ var gZenMarketplaceManager = {
var gZenLooksAndFeel = {
init() {
+ if (this.__hasInitialized) return;
+ this.__hasInitialized = true;
this._initializeColorPicker(this._getInitialAccentColor());
window.zenPageAccentColorChanged = this._handleAccentColorChange.bind(this);
this._initializeTabbarExpandForm();
@@ -223,9 +225,64 @@ var gZenLooksAndFeel = {
gZenMarketplaceManager.init();
var onLegacyToolbarChange = this.onLegacyToolbarChange.bind(this);
Services.prefs.addObserver('zen.themes.tabs.legacy-location', onLegacyToolbarChange);
+ var onPreferColorSchemeChange = this.onPreferColorSchemeChange.bind(this);
+ window.matchMedia('(prefers-color-scheme: dark)').addListener(onPreferColorSchemeChange);
+ this.onPreferColorSchemeChange();
window.addEventListener('unload', () => {
Services.prefs.removeObserver('zen.themes.tabs.legacy-location', onLegacyToolbarChange);
+ window.matchMedia('(prefers-color-scheme: dark)').removeListener(onPreferColorSchemeChange);
});
+ setTimeout(() => {
+ const group = document.getElementById('zenLooksAndFeelGroup');
+ const webGroup = document.getElementById('webAppearanceGroup');
+ webGroup.style.display = 'none';
+ // Iterate reverse to prepend the elements in the correct order.
+ for (let child of [...webGroup.children].reverse()) {
+ group.prepend(child);
+ }
+ }, 500);
+ this.setDarkThemeListener();
+ },
+
+ onPreferColorSchemeChange(event) {
+ const darkTheme = window.matchMedia('(prefers-color-scheme: dark)').matches;
+ let elem = document.getElementById("ZenDarkThemeStyles");
+ if (darkTheme) {
+ elem.removeAttribute('hidden');
+ } else {
+ elem.setAttribute('hidden', 'true');
+ }
+ },
+
+ setDarkThemeListener() {
+ this.chooser = document.getElementById("zen-dark-theme-styles-form");
+ this.radios = [...this.chooser.querySelectorAll("input")];
+ for (let radio of this.radios) {
+ if (radio.value === "amoled" && Services.prefs.getBoolPref("zen.theme.color-prefs.amoled")) {
+ radio.checked = true;
+ } else if (radio.value === "colorful" && Services.prefs.getBoolPref("zen.theme.color-prefs.colorful")) {
+ radio.checked = true;
+ } else if (radio.value === "default" && !Services.prefs.getBoolPref("zen.theme.color-prefs.amoled") && !Services.prefs.getBoolPref("zen.theme.color-prefs.colorful")) {
+ radio.checked = true;
+ }
+ radio.addEventListener("change", e => {
+ let value = e.target.value;
+ switch (value) {
+ case "amoled":
+ Services.prefs.setBoolPref("zen.theme.color-prefs.amoled", true);
+ Services.prefs.setBoolPref("zen.theme.color-prefs.colorful", false);
+ break;
+ case "colorful":
+ Services.prefs.setBoolPref("zen.theme.color-prefs.amoled", false);
+ Services.prefs.setBoolPref("zen.theme.color-prefs.colorful", true);
+ break;
+ default:
+ Services.prefs.setBoolPref("zen.theme.color-prefs.amoled", false);
+ Services.prefs.setBoolPref("zen.theme.color-prefs.colorful", false);
+ break;
+ }
+ });
+ }
},
async onLegacyToolbarChange(event) {
diff --git a/src/browser/components/preferences/zenLooksAndFeel.inc.xhtml b/src/browser/components/preferences/zenLooksAndFeel.inc.xhtml
index e7ddbc4d1..cd4ccf229 100644
--- a/src/browser/components/preferences/zenLooksAndFeel.inc.xhtml
+++ b/src/browser/components/preferences/zenLooksAndFeel.inc.xhtml
@@ -17,27 +17,39 @@
-
+
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+