1
0
Fork 1
mirror of https://github.com/zen-browser/desktop.git synced 2025-07-08 00:10:00 +02:00

feat: Added migration for webUI theme and fixed comments on profile configs, b=no-bug, c=compact-mode, glance, kbs, mods, split-view, workspaces, media, common

This commit is contained in:
Mr. M 2025-06-28 21:25:52 +02:00
parent 54702d9092
commit 6a8afc4282
No known key found for this signature in database
GPG key ID: 6292C4C8F8652B18
33 changed files with 149 additions and 139 deletions

View file

@ -1,6 +1,6 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
pref("browser.ml.chat.enabled", false);
pref("browser.ml.chat.shortcuts", false);

View file

@ -1,7 +1,7 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
// Restore session on startup
pref("browser.startup.page", 3);

View file

@ -1,6 +1,6 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
// Common UI changes
pref("browser.privatebrowsing.vpnpromourl", "", locked);

View file

@ -1,6 +1,6 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
// security: They must enable this themselves, to avoid people downloading malware
pref('xpinstall.signatures.required', true);

View file

@ -1,6 +1,6 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#ifdef MOZILLA_OFFICIAL
pref('zen.welcome-screen.seen', false, sticky);

View file

@ -1,6 +1,6 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
pref('zen.view.compact.hide-tabbar', true);
pref('zen.view.compact.hide-toolbar', false);

View file

@ -1,6 +1,6 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
pref('zen.downloads.download-animation', true);
pref('zen.downloads.download-animation-duration', 1000); // ms

View file

@ -1,6 +1,6 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
pref('zen.glance.enabled', true);
pref('zen.glance.enable-contextmenu-search', true);

View file

@ -1,6 +1,6 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
pref('zen.keyboard.shortcuts.enabled', true);
pref('zen.keyboard.shortcuts.version', 0); // Empty string means default shortcuts

View file

@ -1,6 +1,6 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
pref('zen.mods.updated-value-observer', false);

View file

@ -1,6 +1,6 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
pref('zen.splitView.enable-tab-drop', true);
pref('zen.splitView.min-resize-width', 7);

View file

@ -1,13 +1,12 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
pref('zen.theme.accent-color', "#ffb787");
pref('zen.theme.content-element-separation', 8); // In pixels
pref('zen.theme.gradient', true);
pref('zen.theme.gradient.show-custom-colors', false);
pref('zen.theme.essentials-favicon-bg', true);
pref('zen.theme.window.scheme', 'auto'); // auto, light, dark
#ifdef XP_MACOSX
pref('zen.theme.border-radius', 10); // In pixels
@ -21,5 +20,5 @@ pref('zen.theme.window.scheme', 'auto'); // auto, light, dark
pref('zen.theme.acrylic-elements', false);
#endif
// Light weight themes
# Light weight themes
pref('zen.theme.disable-lightweight', true);

View file

@ -1,6 +1,6 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
pref('zen.urlbar.replace-newtab', true);
pref('zen.urlbar.show-protections-icon', false);

View file

@ -1,6 +1,6 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
pref('zen.view.sidebar-height-throttle', 0); // in ms
pref('zen.view.sidebar-expanded.max-width', 500);
@ -22,3 +22,8 @@ pref('zen.view.grey-out-inactive-windows', true);
pref('zen.view.show-newtab-button-border-top', false);
pref('zen.view.show-newtab-button-top', true);
# 0: Dark
# 1: Light
# 2: Auto (system color scheme unless overridden by browser theme)
pref('zen.view.window.scheme', 2); // auto, light, dark

View file

@ -1,6 +1,6 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
pref('zen.workspaces.continue-where-left-off', false);
pref('zen.workspaces.hide-default-container-indicator', true);
@ -19,7 +19,7 @@ pref('zen.workspaces.separate-essentials', true);
pref('zen.workspaces.debug', true);
#endif
// Section: Pinned tabs management
# Section: Pinned tabs management
pref('zen.pinned-tab-manager.debug', false);
pref('zen.pinned-tab-manager.restore-pinned-tabs-to-pinned-url', false);
pref('zen.pinned-tab-manager.close-shortcut-behavior', 'reset-unload-switch');

View file

@ -1,6 +1,6 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
pref("full-screen-api.transition-duration.enter", "0 0");
pref("full-screen-api.transition-duration.leave", "0 0");

View file

@ -1,6 +1,6 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
pref("widget.gtk.rounded-bottom-corners.enabled", true);

View file

@ -1,14 +1,14 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
// Enable transparent background for macos
# Enable transparent background for macos
pref('widget.macos.sidebar-blend-mode.behind-window', true);
// 1. hudWindow
// 2. fullScreenUI
// 3. popover
// 4. menu
// 5. toolTip
// 6. headerView
// 7. underlay
# 1. hudWindow
# 2. fullScreenUI
# 3. popover
# 4. menu
# 5. toolTip
# 6. headerView
# 7. underlay
pref('zen.widget.macos.window-material', 1);

View file

@ -1,6 +1,6 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
pref('image.jxl.enabled', true, locked);
pref("svg.context-properties.content.enabled", true);

View file

@ -1,6 +1,6 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
pref('browser.newtabpage.activity-stream.feeds.topsites', false);
pref('browser.newtabpage.activity-stream.feeds.section.topstories', false);

View file

@ -1,6 +1,6 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
pref('pdfjs.enableHighlightEditor', true);
pref('pdfjs.enableHighlightFloatingButton', true);

View file

@ -1,17 +1,17 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#ifdef XP_MACOSX
// Pref to control the reponse taken on macOS when the OS is under memory
// pressure. Changes to the pref take effect immediately. Browser restart not
// required. The pref value is a bitmask:
// 0x0: No response (other than recording for telemetry, crash reporting)
// 0x1: Use the tab unloading feature to reduce memory use. Requires that
// the above "browser.tabs.unloadOnLowMemory" pref be set to true for tab
// unloading to occur.
// 0x2: Issue the internal "memory-pressure" notification to reduce memory use
// 0x3: Both 0x1 and 0x2.
# Pref to control the reponse taken on macOS when the OS is under memory
# pressure. Changes to the pref take effect immediately. Browser restart not
# required. The pref value is a bitmask:
# 0x0: No response (other than recording for telemetry, crash reporting)
# 0x1: Use the tab unloading feature to reduce memory use. Requires that
# the above "browser.tabs.unloadOnLowMemory" pref be set to true for tab
# unloading to occur.
# 0x2: Issue the internal "memory-pressure" notification to reduce memory use
# 0x3: Both 0x1 and 0x2.
pref("browser.lowMemoryResponseMask", 3);
#endif

View file

@ -1,7 +1,7 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
pref("media.videocontrols.picture-in-picture.video-toggle.enabled", true);
// TODO: Enable once we have a proper settings page
# TODO: Enable once we have a proper settings page
pref("media.videocontrols.picture-in-picture.enable-when-switching-tabs.enabled", false);

View file

@ -1,6 +1,6 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
pref("datareporting.policy.dataSubmissionEnabled", false, locked);
pref("datareporting.healthreport.uploadEnabled", false, locked);
@ -25,23 +25,23 @@ pref("app.shield.optoutstudies.enabled", false, locked);
pref("app.normandy.enabled", false);
pref("app.normandy.api_url", "", locked);
// Crash reports
# Crash reports
pref("breakpad.reportURL", "");
pref("browser.tabs.crashReporting.sendReport", false);
pref("browser.crashReports.unsubmittedCheck.autoSubmit2", false);
// Other privacy
# Other privacy
pref("extensions.getAddons.cache.enabled", false);
// Disable cache for private browsing
# Disable cache for private browsing
pref("browser.privatebrowsing.forceMediaMemoryCache", true);
// Tracking protection
# Tracking protection
pref("browser.helperApps.deleteTempFileOnExit", true);
pref("browser.uitour.enabled", false);
pref("privacy.globalprivacycontrol.enabled", true);
// Contextual identity
# Contextual identity
pref('privacy.userContext.enabled', true);
pref('privacy.userContext.ui.enabled', true);

View file

@ -1,6 +1,6 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
pref("general.smoothScroll.msdPhysics.enabled", true);
pref("general.smoothScroll.currentVelocityWeighting", "0.15");

View file

@ -1,6 +1,6 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
pref('browser.urlbar.unitConversion.enabled', true);
pref('browser.urlbar.trending.featureGate', false);
@ -12,10 +12,10 @@ pref('browser.urlbar.suggest.calculator', true);
pref("browser.urlbar.trimHttps", true);
pref("browser.urlbar.untrimOnUserInteraction.featureGate", true);
// Keep in sync with browser/components/topsites/constants.mjs
# Keep in sync with browser/components/topsites/constants.mjs
pref("browser.urlbar.maxRichResults", 7);
// Enable private suggestions
# Enable private suggestions
pref('browser.search.suggest.enabled', false);
pref('browser.search.suggest.enabled.private', false);

View file

@ -1,8 +1,8 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
// Mica
# Mica
pref("widget.windows.mica", true);
pref("widget.windows.mica.popups", true);
pref("widget.windows.mica.toplevel-backdrop", 2);

View file

@ -1,6 +1,6 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#ifdef XP_UNIX
#ifndef XP_MACOSX
@ -8,7 +8,7 @@
#endif
#endif
// Dont download the multilingual dictionary
# Dont download the multilingual dictionary
pref("intl.multilingual.downloadEnabled", false);
#ifdef XP_WIN

View file

@ -772,7 +772,7 @@
list-style-image: url('sparkles.svg');
}
@media -moz-pref('zen.theme.window.scheme', 'auto') {
@media -moz-pref('zen.view.window.scheme', 2) {
#PanelUI-zen-gradient-generator-scheme-auto {
background: light-dark(rgba(0, 0, 0, 0.1), rgba(255, 255, 255, 0.1));
}
@ -782,7 +782,7 @@
list-style-image: url('moon-stars.svg');
}
@media -moz-pref('zen.theme.window.scheme', 'dark') {
@media -moz-pref('zen.view.window.scheme', 0) {
#PanelUI-zen-gradient-generator-scheme-dark {
background: light-dark(rgba(0, 0, 0, 0.1), rgba(255, 255, 255, 0.1));
}
@ -792,7 +792,7 @@
list-style-image: url('face-sun.svg');
}
@media -moz-pref('zen.theme.window.scheme', 'light') {
@media -moz-pref('zen.view.window.scheme', 1) {
#PanelUI-zen-gradient-generator-scheme-light {
background: light-dark(rgba(0, 0, 0, 0.1), rgba(255, 255, 255, 0.1));
}

View file

@ -55,6 +55,8 @@ class nsZenUIMigration {
'zen.workspaces.separate-essentials',
Services.prefs.getBoolPref('zen.workspaces.container-specific-essentials-enabled', false)
);
const theme = Services.prefs.getIntPref('layout.css.prefers-color-scheme.content-override', 0);
Services.prefs.setIntPref('zen.view.window.scheme', theme);
}
}

View file

@ -390,8 +390,6 @@ menuseparator {
& label {
margin-top: 0;
margin-bottom: 0;
/* Invert the color based on the background */
color: light-dark(rgba(255, 255, 255, 0.9), rgba(0, 0, 0, 0.9));
}
& button {

View file

@ -44,7 +44,7 @@
var(--zen-colors-tertiary) 99%
);
--zen-dialog-background: var(--zen-colors-tertiary);
--zen-dialog-background: light-dark(var(--zen-colors-tertiary), var(--zen-branding-bg));
--zen-urlbar-background: color-mix(in srgb, var(--zen-primary-color) 3%, #f4f4f4 97%);
--zen-secondary-btn-color: var(--zen-colors-primary-foreground);
@ -245,15 +245,15 @@
& #zen-browser-background,
& #urlbar[breakout-extend='true'],
& #tabbrowser-tabpanels browser[type='content'] {
@media -moz-pref('zen.theme.window.scheme', 'dark') {
@media -moz-pref('zen.view.window.scheme', 0) {
color-scheme: dark;
}
@media -moz-pref('zen.theme.window.scheme', 'light') {
@media -moz-pref('zen.view.window.scheme', 1) {
color-scheme: light;
}
@media -moz-pref('zen.theme.window.scheme', 'auto') {
@media -moz-pref('zen.view.window.scheme', 2) {
color-scheme: light;
@media (-moz-system-dark-theme) {
color-scheme: dark;
@ -266,34 +266,33 @@
:host(:is(.anonymous-content-host, notification-message)),
:root {
--zen-in-content-dialog-background: var(--zen-branding-bg);
--zen-dark-color-mix-base: var(--zen-branding-bg);
--zen-colors-primary: color-mix(
in srgb,
var(--zen-primary-color) 20%,
var(--zen-dark-color-mix-base) 80%
var(--zen-branding-bg) 80%
);
--zen-colors-secondary: color-mix(
in srgb,
var(--zen-primary-color) 30%,
var(--zen-dark-color-mix-base) 70%
var(--zen-branding-bg) 70%
);
--zen-colors-tertiary: color-mix(
in srgb,
var(--zen-primary-color) 1%,
var(--zen-dark-color-mix-base) 99%
var(--zen-branding-bg) 99%
);
--zen-colors-hover-bg: color-mix(
in srgb,
var(--zen-primary-color) 90%,
var(--zen-dark-color-mix-base) 10%
var(--zen-branding-bg) 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) 1%,
var(--zen-dark-color-mix-base) 99%
var(--zen-branding-bg) 99%
);
--zen-colors-border: color-mix(in srgb, var(--zen-colors-secondary) 20%, rgb(79, 79, 79) 80%);
--zen-colors-border-contrast: color-mix(
@ -302,13 +301,12 @@
rgba(255, 255, 255, 0.11) 90%
);
--zen-dialog-background: var(--zen-dark-color-mix-base);
--zen-urlbar-background: color-mix(in srgb, var(--zen-primary-color) 4%, rgb(24, 24, 24) 96%);
--zen-browser-gradient-base: color-mix(
in srgb,
var(--zen-primary-color) 30%,
var(--zen-dark-color-mix-base) 70%
var(--zen-branding-bg) 70%
);
}
}

View file

@ -116,8 +116,8 @@
XPCOMUtils.defineLazyPreferenceGetter(
this,
'windowSchemeType',
'zen.theme.window.scheme',
true,
'zen.view.window.scheme',
2,
darkModeChange
);
}
@ -128,9 +128,9 @@
get isDarkMode() {
switch (this.windowSchemeType) {
case 'dark':
case 0:
return true;
case 'light':
case 1:
return false;
default:
}
@ -252,11 +252,15 @@
if (!scheme) {
return;
}
if (this.currentScheme === scheme) {
const themeInt = {
auto: 2,
light: 1,
dark: 0,
}[scheme];
if (themeInt === undefined) {
return;
}
this.currentScheme = scheme;
Services.prefs.setStringPref('zen.theme.window.scheme', scheme);
Services.prefs.setIntPref('zen.view.window.scheme', themeInt);
});
}
@ -1021,8 +1025,12 @@
}
let opacity = this.currentOpacity;
if (forToolbar) {
color = this.blendColors(
color.c,
this.getToolbarModifiedBaseRaw().slice(0, 3),
opacity * 100
);
opacity = 1; // Toolbar colors should always be fully opaque
color = this.blendColors(color.c, this.getToolbarModifiedBaseRaw().slice(0, 3), 80);
} else {
color = color.c;
}