Compare commits

...

4 Commits

6 changed files with 29 additions and 24 deletions

View File

@@ -4,7 +4,7 @@
class nsZenUIMigration {
PREF_NAME = 'zen.ui.migration.version';
MIGRATION_VERSION = 1;
MIGRATION_VERSION = 2;
init(isNewProfile) {
if (!isNewProfile) {
@@ -57,6 +57,9 @@ class nsZenUIMigration {
);
const theme = Services.prefs.getIntPref('layout.css.prefers-color-scheme.content-override', 0);
Services.prefs.setIntPref('zen.view.window.scheme', theme);
}
_migrateV2() {
Services.prefs.setIntPref('zen.theme.gradient-legacy-version', 0);
}
}

View File

@@ -398,8 +398,9 @@ menuseparator {
min-width: unset !important;
margin: 0px !important;
border-radius: calc(var(--zen-native-inner-radius) + 2px) !important;
background: light-dark(rgba(255, 255, 255, 0.1), rgba(0, 0, 0, 0.1)) !important;
border: 1px solid light-dark(rgba(255, 255, 255, 0.15), rgba(0, 0, 0, 0.15)) !important;
background: light-dark(rgba(0, 0, 0, 0.1), rgba(255, 255, 255, 0.1)) !important;
border: 1px solid light-dark(rgba(0, 0, 0, 0.15), rgba(255, 255, 255, 0.15)) !important;
color: light-dark(rgba(0, 0, 0, 0.8), rgba(255, 255, 255, 0.8)) !important;
:root[zen-right-side='true'] & {
order: -1;

View File

@@ -142,7 +142,6 @@
--toolbox-textcolor-inactive: var(--toolbox-textcolor) !important;
/* Other colors */
--urlbar-box-bgcolor: var(--zen-urlbar-background) !important;
--urlbar-box-active-bgcolor: var(--toolbarbutton-hover-background) !important;
--toolbar-field-focus-background-color: var(--urlbar-box-bgcolor) !important;
--zen-input-border-color: light-dark(rgb(204, 204, 204), rgb(66, 65, 77));
@@ -246,7 +245,8 @@
& menupopup,
& #zen-browser-background,
& #urlbar[breakout-extend='true'],
& #tabbrowser-tabpanels browser[type='content'] {
& #tabbrowser-tabpanels browser[type='content'],
&:not([zen-should-be-dark-mode]) #zen-toast-container {
@media -moz-pref('zen.view.window.scheme', 0) {
color-scheme: dark;
}

View File

@@ -64,32 +64,33 @@
}
async #rebuildModsStylesheet() {
const shouldBeEnabled = !Services.prefs.getBoolPref('zen.themes.disable-all', false);
if (shouldBeEnabled) {
const mods = await this.#getEnabledMods();
const mods = await this.#getEnabledMods();
await this.#writeStylesheet(mods);
await this.#writeStylesheet(mods);
const modsWithPreferences = await Promise.all(
mods.map(async (mod) => {
const preferences = await this.getModPreferences(mod);
const modsWithPreferences = await Promise.all(
mods.map(async (mod) => {
const preferences = await this.getModPreferences(mod);
return {
name: mod.name,
enabled: mod.enabled,
preferences,
};
})
);
return {
name: mod.name,
enabled: mod.enabled,
preferences,
};
})
);
this.#setDefaults(modsWithPreferences);
this.#writeToDom(modsWithPreferences);
}
this.#setDefaults(modsWithPreferences);
this.#writeToDom(modsWithPreferences);
await this.#insertStylesheet();
}
async #getEnabledMods() {
if (Services.prefs.getBoolPref('zen.themes.disable-all', false)) {
console.log('[ZenMods]: Mods are disabled by user preference.');
return [];
}
const modsObject = await this.getMods();
const mods = Object.values(modsObject).filter(
(mod) => mod.enabled === undefined || mod.enabled

View File

@@ -1628,7 +1628,7 @@
const previousOpacity = this.currentOpacity;
const previousLightness = this.#currentLightness;
this.currentOpacity = workspace.theme.opacity ?? 0.5;
this.#currentLightness = workspace.theme.lightness ?? 70;
this.#currentLightness = workspace.theme.lightness ?? 50;
const gradient = this.getGradient(workspace.theme.gradientColors);
this.currentOpacity = previousOpacity;
this.#currentLightness = previousLightness;

View File

@@ -19,7 +19,7 @@
"brandShortName": "Zen",
"brandFullName": "Zen Browser",
"release": {
"displayVersion": "1.14.1b",
"displayVersion": "1.14.2b",
"github": {
"repo": "zen-browser/desktop"
},