diff --git a/README.md b/README.md
index 9b344a2a..b23dca1c 100644
--- a/README.md
+++ b/README.md
@@ -29,8 +29,8 @@ Zen is a firefox-based browser with the aim of pushing your productivity to a ne
### Firefox Versions
-- [`Release`](https://zen-browser.app/download) - Is currently built using Firefox version `139.0.4`! 🚀
-- [`Twilight`](https://zen-browser.app/download?twilight) - Is currently built using Firefox version `RC 140.0`!
+- [`Release`](https://zen-browser.app/download) - Is currently built using Firefox version `140.0.1`! 🚀
+- [`Twilight`](https://zen-browser.app/download?twilight) - Is currently built using Firefox version `RC 140.0.1`!
### Contributing
diff --git a/build/firefox-cache/l10n-last-commit-hash b/build/firefox-cache/l10n-last-commit-hash
index 95e73b02..a77d8f54 100644
--- a/build/firefox-cache/l10n-last-commit-hash
+++ b/build/firefox-cache/l10n-last-commit-hash
@@ -1 +1 @@
-667950575bde54b8d83db2a25ccf468522d4e0c9
\ No newline at end of file
+d5e5ed08dac5a263dbc7784dff272198b17bbc4f
\ No newline at end of file
diff --git a/src/browser/app/profile/features/workspaces.inc b/src/browser/app/profile/features/workspaces.inc
index 117158f8..2d954863 100644
--- a/src/browser/app/profile/features/workspaces.inc
+++ b/src/browser/app/profile/features/workspaces.inc
@@ -11,7 +11,7 @@ pref('zen.workspaces.wrap-around-navigation', true);
pref('zen.workspaces.natural-scroll', false);
pref('zen.workspaces.scroll-modifier-key','ctrl'); // can be ctrl, alt, shift, or a meta key
pref('services.sync.engine.workspaces', false);
-pref('zen.workspaces.container-specific-essentials-enabled', false);
+pref('zen.workspaces.separate-essentials', true);
#ifdef MOZILLA_OFFICIAL
pref('zen.workspaces.debug', false);
diff --git a/src/browser/components/preferences/zen-settings.js b/src/browser/components/preferences/zen-settings.js
index 1579b56f..09bbf767 100644
--- a/src/browser/components/preferences/zen-settings.js
+++ b/src/browser/components/preferences/zen-settings.js
@@ -742,19 +742,13 @@ var gZenWorkspacesSettings = {
};
Services.prefs.addObserver('zen.tab-unloader.enabled', tabsUnloaderPrefListener);
Services.prefs.addObserver('zen.glance.enabled', tabsUnloaderPrefListener); // We can use the same listener for both prefs
- Services.prefs.addObserver(
- 'zen.workspaces.container-specific-essentials-enabled',
- tabsUnloaderPrefListener
- );
+ Services.prefs.addObserver('zen.workspaces.separate-essentials', tabsUnloaderPrefListener);
Services.prefs.addObserver('zen.glance.activation-method', tabsUnloaderPrefListener);
window.addEventListener('unload', () => {
Services.prefs.removeObserver('zen.tab-unloader.enabled', tabsUnloaderPrefListener);
Services.prefs.removeObserver('zen.glance.enabled', tabsUnloaderPrefListener);
Services.prefs.removeObserver('zen.glance.activation-method', tabsUnloaderPrefListener);
- Services.prefs.removeObserver(
- 'zen.workspaces.container-specific-essentials-enabled',
- tabsUnloaderPrefListener
- );
+ Services.prefs.removeObserver('zen.workspaces.separate-essentials', tabsUnloaderPrefListener);
});
},
};
@@ -1153,7 +1147,7 @@ Preferences.addAll([
default: true,
},
{
- id: 'zen.workspaces.container-specific-essentials-enabled',
+ id: 'zen.workspaces.separate-essentials',
type: 'bool',
default: false,
},
diff --git a/src/browser/components/preferences/zenTabsManagement.inc.xhtml b/src/browser/components/preferences/zenTabsManagement.inc.xhtml
index 5ee4a810..46a921c8 100644
--- a/src/browser/components/preferences/zenTabsManagement.inc.xhtml
+++ b/src/browser/components/preferences/zenTabsManagement.inc.xhtml
@@ -47,7 +47,7 @@
preference="zen.pinned-tab-manager.restore-pinned-tabs-to-pinned-url"/>
+ preference="zen.workspaces.separate-essentials"/>
diff --git a/src/modules/libpref/init/zen-static-prefs.inc b/src/modules/libpref/init/zen-static-prefs.inc
index 982b531a..dae70434 100644
--- a/src/modules/libpref/init/zen-static-prefs.inc
+++ b/src/modules/libpref/init/zen-static-prefs.inc
@@ -16,3 +16,8 @@
type: bool
value: true
mirror: always
+
+- name: zen.swipe.is-fast-swipe
+ type: bool
+ value: true
+ mirror: always
diff --git a/src/widget/SwipeTracker-cpp.patch b/src/widget/SwipeTracker-cpp.patch
new file mode 100644
index 00000000..d90839d8
--- /dev/null
+++ b/src/widget/SwipeTracker-cpp.patch
@@ -0,0 +1,21 @@
+diff --git a/widget/SwipeTracker.cpp b/widget/SwipeTracker.cpp
+index b09252fd60beb10d5865d226c39ee0c8a9c22d87..91f68161209c6ca3f3bac22997d4e2066f1fafec 100644
+--- a/widget/SwipeTracker.cpp
++++ b/widget/SwipeTracker.cpp
+@@ -5,6 +5,7 @@
+ * You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+ #include "SwipeTracker.h"
++#include "mozilla/StaticPrefs_zen.h"
+
+ #include "InputData.h"
+ #include "mozilla/FlushType.h"
+@@ -90,7 +91,7 @@ bool SwipeTracker::ComputeSwipeSuccess() const {
+
+ return (mGestureAmount * targetValue +
+ mCurrentVelocity * targetValue *
+- StaticPrefs::widget_swipe_success_velocity_contribution()) >=
++ (StaticPrefs::zen_swipe_is_fast_swipe() ? 0.5 : StaticPrefs::widget_swipe_success_velocity_contribution())) >=
+ kSwipeSuccessThreshold;
+ }
+
diff --git a/src/zen/common/ZenUIMigration.mjs b/src/zen/common/ZenUIMigration.mjs
index 13f190b3..0bb03d94 100644
--- a/src/zen/common/ZenUIMigration.mjs
+++ b/src/zen/common/ZenUIMigration.mjs
@@ -51,6 +51,10 @@ class nsZenUIMigration {
if (userChromeFile.exists() || userContentFile.exists()) {
Services.prefs.setBoolPref('toolkit.legacyUserProfileCustomizations.stylesheets', true);
}
+ Services.prefs.setBoolPref(
+ 'zen.workspaces.separate-essentials',
+ Services.prefs.getBoolPref('zen.workspaces.container-specific-essentials-enabled', false)
+ );
}
}
diff --git a/src/zen/common/styles/zen-browser-ui.css b/src/zen/common/styles/zen-browser-ui.css
index f2ec1fdf..3d487d79 100644
--- a/src/zen/common/styles/zen-browser-ui.css
+++ b/src/zen/common/styles/zen-browser-ui.css
@@ -93,7 +93,9 @@
z-index: 1;
opacity: var(--zen-grainy-background-opacity, 0);
mix-blend-mode: overlay;
- transition: opacity 0.3s ease-in-out;
+ :root:not([swipe-gesture='true']) & {
+ transition: opacity 0.3s ease-in-out;
+ }
}
}
diff --git a/src/zen/common/styles/zen-theme.css b/src/zen/common/styles/zen-theme.css
index fb9ea9a8..49f2a178 100644
--- a/src/zen/common/styles/zen-theme.css
+++ b/src/zen/common/styles/zen-theme.css
@@ -130,8 +130,8 @@
--toolbarbutton-hover-background: color-mix(
in srgb,
- var(--zen-branding-bg-reverse) 5%,
- transparent 95%
+ var(--zen-branding-bg-reverse) 7.5%,
+ transparent 92.5%
);
--toolbarbutton-active-background: color-mix(
@@ -192,11 +192,7 @@
--zen-active-tab-scale: 0.98;
/* Define tab hover background color */
- --tab-hover-background-color: color-mix(
- in srgb,
- var(--toolbarbutton-hover-background) 50%,
- transparent 50%
- );
+ --tab-hover-background-color: var(--toolbarbutton-hover-background);
/* Nativity */
--zen-native-content-radius: var(--zen-border-radius);
diff --git a/src/zen/tests/container_essentials/browser.toml b/src/zen/tests/container_essentials/browser.toml
index 91470302..2da4992f 100644
--- a/src/zen/tests/container_essentials/browser.toml
+++ b/src/zen/tests/container_essentials/browser.toml
@@ -1,5 +1,5 @@
[DEFAULT]
-prefs = ["zen.workspaces.container-specific-essentials-enabled=true"]
+prefs = ["zen.workspaces.separate-essentials=true"]
["browser_container_auto_switch.js"]
["browser_container_specific_essentials.js"]
\ No newline at end of file
diff --git a/src/zen/tests/pinned/browser.toml b/src/zen/tests/pinned/browser.toml
index fd78aab3..1ff8ac55 100644
--- a/src/zen/tests/pinned/browser.toml
+++ b/src/zen/tests/pinned/browser.toml
@@ -1,3 +1,5 @@
+[DEFAULT]
+prefs = ["zen.workspaces.separate-essentials=false"]
["browser_pinned_unload_changed.js"]
["browser_pinned_unload_noreset.js"]
diff --git a/src/zen/tests/workspaces/browser.toml b/src/zen/tests/workspaces/browser.toml
index c68d45dd..9903e2a8 100644
--- a/src/zen/tests/workspaces/browser.toml
+++ b/src/zen/tests/workspaces/browser.toml
@@ -1,4 +1,5 @@
[DEFAULT]
+prefs = ["zen.workspaces.separate-essentials=false"]
support-files = [
"head.js",
]
diff --git a/src/zen/workspaces/ZenGradientGenerator.mjs b/src/zen/workspaces/ZenGradientGenerator.mjs
index a56456fd..a5beed1f 100644
--- a/src/zen/workspaces/ZenGradientGenerator.mjs
+++ b/src/zen/workspaces/ZenGradientGenerator.mjs
@@ -1253,7 +1253,11 @@
};
getMostDominantColor(allColors) {
- return this.getPrimaryColor(allColors);
+ const color = this.getPrimaryColor(allColors);
+ if (typeof color === 'string') {
+ return this.hexToRgb(color);
+ }
+ return color;
}
blendColors(rgb1, rgb2, percentage) {
@@ -1629,8 +1633,8 @@
const gradient = this.getGradient(workspace.theme.gradientColors);
this.currentOpacity = previousOpacity;
this.#currentLightness = previousLightness;
- this.#gradientsCache[uuid] = gradient;
- return gradient;
+ this.#gradientsCache[uuid] = [gradient, workspace.theme.texture ?? 0];
+ return this.#gradientsCache[uuid];
}
}
diff --git a/src/zen/workspaces/ZenWorkspaces.mjs b/src/zen/workspaces/ZenWorkspaces.mjs
index 4b6de44a..97d83b11 100644
--- a/src/zen/workspaces/ZenWorkspaces.mjs
+++ b/src/zen/workspaces/ZenWorkspaces.mjs
@@ -100,7 +100,7 @@ var gZenWorkspaces = new (class extends ZenMultiWindowFeature {
false
);
this.containerSpecificEssentials = Services.prefs.getBoolPref(
- 'zen.workspaces.container-specific-essentials-enabled',
+ 'zen.workspaces.separate-essentials',
false
);
ChromeUtils.defineLazyGetter(this, 'tabContainer', () =>
@@ -695,6 +695,7 @@ var gZenWorkspaces = new (class extends ZenMultiWindowFeature {
element.addEventListener(
'MozSwipeGestureEnd',
() => {
+ Services.prefs.setBoolPref('zen.swipe.is-fast-swipe', false);
document.documentElement.removeAttribute('swipe-gesture');
gZenUIManager.tabsWrapper.style.removeProperty('scrollbar-width');
delete this._hasAnimatedBackgrounds;
@@ -742,6 +743,7 @@ var gZenWorkspaces = new (class extends ZenMultiWindowFeature {
lastDelta: 0,
direction: null,
};
+ Services.prefs.setBoolPref('zen.swipe.is-fast-swipe', true);
}
_handleSwipeUpdate(event) {
@@ -762,7 +764,7 @@ var gZenWorkspaces = new (class extends ZenMultiWindowFeature {
translateX = this._swipeState.lastDelta;
}
- if (Math.abs(delta) > 1) {
+ if (Math.abs(delta) > 0.8) {
this._swipeState.direction = delta > 0 ? 'left' : 'right';
}
@@ -1713,30 +1715,33 @@ var gZenWorkspaces = new (class extends ZenMultiWindowFeature {
}
if (offsetPixels) {
// Find the next workspace we are scrolling to
- if (!this._hasAnimatedBackgrounds) {
- this._hasAnimatedBackgrounds = true;
- const nextWorkspace = workspaces.workspaces[workspaceIndex + (offsetPixels > 0 ? -1 : 1)];
- if (nextWorkspace) {
- const nextGradient = await gZenThemePicker.getGradientForWorkspace(nextWorkspace);
- const existingBackground = document.documentElement.style.getPropertyValue(
- '--zen-main-browser-background'
+ const nextWorkspace = workspaces.workspaces[workspaceIndex + (offsetPixels > 0 ? -1 : 1)];
+ if (nextWorkspace) {
+ const [nextGradient, nextGrain] =
+ await gZenThemePicker.getGradientForWorkspace(nextWorkspace);
+ const [existingBackground, existingGrain] =
+ await gZenThemePicker.getGradientForWorkspace(workspace);
+ const percentage = Math.abs(offsetPixels) / 200;
+ if (!this._hasAnimatedBackgrounds) {
+ this._hasAnimatedBackgrounds = true;
+ document.documentElement.style.setProperty(
+ '--zen-main-browser-background-old',
+ existingBackground
);
- if (existingBackground !== nextGradient) {
- document.documentElement.style.setProperty(
- '--zen-main-browser-background-old',
- existingBackground
- );
- document.documentElement.style.setProperty(
- '--zen-main-browser-background',
- nextGradient
- );
- }
+ document.documentElement.style.setProperty('--zen-main-browser-background', nextGradient);
}
+ document.documentElement.style.setProperty('--zen-background-opacity', percentage);
+ // Fit the offsetPixels into the grain limits. Both ends may be nextGrain and existingGrain,
+ // so we need to use the min and max of both. For example, existing may be 0.2 and next may be 0.5,
+ // meaning we should convert the offset to a percentage between 0.2 and 0.5. BUT if existingGrain
+ // is 0.5 and nextGrain is 0.2, we should still convert the offset to a percentage between 0.2 and 0.5.
+ const minGrain = Math.min(existingGrain, nextGrain);
+ const maxGrain = Math.max(existingGrain, nextGrain);
+ const grainValue =
+ minGrain +
+ (maxGrain - minGrain) * (existingGrain > nextGrain ? 1 - percentage : percentage);
+ gZenThemePicker.updateNoise(grainValue);
}
- document.documentElement.style.setProperty(
- '--zen-background-opacity',
- Math.abs(offsetPixels) / 200
- );
} else {
delete this._hasAnimatedBackgrounds;
}
diff --git a/surfer.json b/surfer.json
index 8578e4cd..3b549e6e 100644
--- a/surfer.json
+++ b/surfer.json
@@ -5,8 +5,8 @@
"binaryName": "zen",
"version": {
"product": "firefox",
- "version": "139.0.4",
- "candidate": "140.0"
+ "version": "140.0.1",
+ "candidate": "140.0.1"
},
"buildOptions": {
"generateBranding": true
@@ -19,7 +19,7 @@
"brandShortName": "Zen",
"brandFullName": "Zen Browser",
"release": {
- "displayVersion": "1.13.2b",
+ "displayVersion": "1.14b",
"github": {
"repo": "zen-browser/desktop"
},
@@ -39,7 +39,7 @@
"brandShortName": "Twilight",
"brandFullName": "Zen Twilight",
"release": {
- "displayVersion": "1.14t",
+ "displayVersion": "1.15t",
"github": {
"repo": "zen-browser/desktop"
}