Skip to content

Commit cc2c904

Browse files
committed
feat: Set auto theme as default theme for zen, b=(no-bug), c=common, tabs
1 parent d816bca commit cc2c904

File tree

9 files changed

+7
-116
lines changed

9 files changed

+7
-116
lines changed

src/browser/components/customizableui/CustomizableUI-sys-mjs.patch

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
diff --git a/browser/components/customizableui/CustomizableUI.sys.mjs b/browser/components/customizableui/CustomizableUI.sys.mjs
2-
index 91088fab1759b9af908912648d28daa5938a29c9..3f52ee8cd77ac171fd2cbf355ade1371e57d0db5 100644
2+
index 91088fab1759b9af908912648d28daa5938a29c9..399ee5303c909c7bd81cbfad3f0957350d49a03e 100644
33
--- a/browser/components/customizableui/CustomizableUI.sys.mjs
44
+++ b/browser/components/customizableui/CustomizableUI.sys.mjs
55
@@ -13,6 +13,7 @@ ChromeUtils.defineESModuleGetters(lazy, {
@@ -10,15 +10,6 @@ index 91088fab1759b9af908912648d28daa5938a29c9..3f52ee8cd77ac171fd2cbf355ade1371
1010
HomePage: "resource:///modules/HomePage.sys.mjs",
1111
PanelMultiView: "resource:///modules/PanelMultiView.sys.mjs",
1212
PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.sys.mjs",
13-
@@ -25,7 +26,7 @@ ChromeUtils.defineLazyGetter(lazy, "gWidgetsBundle", function () {
14-
return Services.strings.createBundle(kUrl);
15-
});
16-
17-
-const kDefaultThemeID = "[email protected]";
18-
+const kDefaultThemeID = "[email protected]";
19-
20-
const kSpecialWidgetPfx = "customizableui-special-";
21-
2213
@@ -338,13 +339,11 @@ var CustomizableUIInternal = {
2314
"vertical-spacer",
2415
"urlbar-container",

src/browser/themes/BuiltInThemes-sys-mjs.patch

Lines changed: 0 additions & 22 deletions
This file was deleted.
Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
diff --git a/toolkit/modules/LightweightThemeConsumer.sys.mjs b/toolkit/modules/LightweightThemeConsumer.sys.mjs
2-
index d8c79cbae4de3ebfc5dc62f3597c7be4965a5429..ba1a44a0be5b5837467cfc84074d4869aee6aa62 100644
2+
index d8c79cbae4de3ebfc5dc62f3597c7be4965a5429..4398108bd6d74aa8b6689baaf5334d8ba9a26c4e 100644
33
--- a/toolkit/modules/LightweightThemeConsumer.sys.mjs
44
+++ b/toolkit/modules/LightweightThemeConsumer.sys.mjs
55
@@ -31,7 +31,7 @@ const toolkitVariableMap = [
@@ -11,26 +11,3 @@ index d8c79cbae4de3ebfc5dc62f3597c7be4965a5429..ba1a44a0be5b5837467cfc84074d4869
1111
}
1212
// Remove the alpha channel
1313
const { r, g, b } = rgbaChannels;
14-
@@ -339,6 +339,7 @@ LightweightThemeConsumer.prototype = {
15-
theme.additionalBackgrounds
16-
);
17-
let _processedColors = _setProperties(root, hasTheme, theme);
18-
+ this._zenSetAccentColor(root);
19-
20-
if (hasTheme) {
21-
if (updateGlobalThemeData) {
22-
@@ -431,6 +432,14 @@ LightweightThemeConsumer.prototype = {
23-
this._lastExperimentData.stylesheet = stylesheet;
24-
}
25-
},
26-
+
27-
+ _zenSetAccentColor(root) {
28-
+ const themeAccent = Services.prefs.getStringPref(
29-
+ "zen.theme.accent-color",
30-
+ "#0b57d0"
31-
+ );
32-
+ root.style.setProperty("--zen-primary-color", themeAccent);
33-
+ },
34-
};
35-
36-
function _getContentProperties(doc, hasTheme, data) {

src/toolkit/mozapps/extensions/internal/AddonSettings-sys-mjs.patch

Lines changed: 0 additions & 13 deletions
This file was deleted.

src/toolkit/mozapps/extensions/internal/XPIDatabase-sys-mjs.patch

Lines changed: 0 additions & 27 deletions
This file was deleted.

src/toolkit/mozapps/extensions/internal/XPIProvider-sys-mjs.patch

Lines changed: 0 additions & 15 deletions
This file was deleted.

src/zen/common/styles/zen-theme.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,9 @@
179179
--zen-big-shadow: 0 0 9.73px 0px light-dark(rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.25));
180180
--zen-active-tab-scale: 0.98;
181181

182+
/* Define tab hover background color */
183+
--tab-hover-background-color: color-mix(in srgb, var(--toolbarbutton-hover-background) 50%, transparent 50%);
184+
182185
/* Nativity */
183186
--zen-native-content-radius: var(--zen-border-radius);
184187
@media (-moz-platform: linux) {

src/zen/common/styles/zen-urlbar.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
}
6666

6767
&:hover #urlbar-background {
68-
background-color: light-dark(rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.2)) !important;
68+
background-color: light-dark(rgba(89, 89, 89, 0.2), rgba(255, 255, 255, 0.2)) !important;
6969
}
7070
}
7171

src/zen/tabs/zen-tabs/vertical-tabs.css

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -191,9 +191,6 @@
191191
--tab-border-radius: 10px;
192192
}
193193

194-
/* Define tab hover background color */
195-
--tab-hover-background-color: color-mix(in srgb, var(--toolbarbutton-hover-background) 50%, transparent 50%);
196-
197194
min-width: var(--zen-toolbox-min-width);
198195
margin-top: 0 !important; /* Fix potential issues in full screen mode */
199196
border: none; /* Remove default borders */
@@ -1319,7 +1316,7 @@
13191316
}
13201317

13211318
&:hover .tab-background {
1322-
background: var(--tab-selected-bgcolor);
1319+
background: var(--tab-hover-background-color);
13231320
}
13241321

13251322
/* Optional blurred favicon background effect (if pref `zen.theme.essentials-favicon-bg` is enabled) */

0 commit comments

Comments
 (0)