no-bug: Use a different blur for the urlbar, depending on the theme (gh-13562)

This commit is contained in:
mr. m
2026-05-05 00:13:14 +02:00
committed by GitHub
parent ce1ee9228b
commit 60a77413df
5 changed files with 10 additions and 5 deletions

View File

@@ -1,5 +1,5 @@
diff --git a/browser/components/customizableui/CustomizableUI.sys.mjs b/browser/components/customizableui/CustomizableUI.sys.mjs
index db617c65b89643015d91b0f6a20eab7d7a1b598f..1511b785a45ebd084de13b091f56a59e7e737b26 100644
index db617c65b89643015d91b0f6a20eab7d7a1b598f..896de41119f787594c30055e54eeac7662667f2c 100644
--- a/browser/components/customizableui/CustomizableUI.sys.mjs
+++ b/browser/components/customizableui/CustomizableUI.sys.mjs
@@ -14,6 +14,7 @@ ChromeUtils.defineESModuleGetters(lazy, {
@@ -200,7 +200,7 @@ index db617c65b89643015d91b0f6a20eab7d7a1b598f..1511b785a45ebd084de13b091f56a59e
+ ...win.document.getElementById("zen-overflow-extensions-list").querySelectorAll(availSelectors)
+ ].length * 26;
+ const urlbarWidth = win.document.getElementById("urlbar-container").getBoundingClientRect().width;
+ let overflowing = width > urlbarWidth * 0.5;
+ let overflowing = width > urlbarWidth * (Services.prefs.getIntPref("zen.view.overflow-webext-toolbar-threshold", 60) / 100);
+ let wasOverflowing = win.gURLBar._isOverflowingItems;
+ win.gURLBar._isOverflowingItems = overflowing;
+ if (wasOverflowing !== overflowing) {

View File

@@ -4,3 +4,4 @@
color-scheme: dark;
--zen-urlbar-outline-offset: -2px;
--zen-urlbar-filter: blur(40px) saturate(110%) brightness(25%) contrast(100%);

View File

@@ -4,3 +4,4 @@
color-scheme: light;
--zen-urlbar-outline-offset: 0px;
--zen-urlbar-filter: blur(40px) saturate(110%) brightness(75%) contrast(100%);

View File

@@ -268,9 +268,9 @@
& .urlbar-background {
--zen-urlbar-background-base: light-dark(#fbfbfb, color-mix(in srgb, hsl(0, 0%, 6.7%), var(--zen-colors-primary) 30%));
/* stylelint-disable-next-line media-query-no-invalid */
@media -moz-pref("zen.theme.acrylic-elements") {
@media -moz-pref("zen.theme.acrylic-elements") and (not (prefers-reduced-transparency: reduce)) {
--zen-urlbar-background-transparent: light-dark(
color-mix(in srgb, var(--zen-urlbar-background-base) 90%, transparent),
color-mix(in srgb, white 80%, transparent),
color-mix(in srgb, var(--zen-urlbar-background-base) 65%, transparent)
);
}
@@ -282,7 +282,7 @@
/* stylelint-disable-next-line media-query-no-invalid */
@media -moz-pref("zen.theme.acrylic-elements") {
backdrop-filter: blur(42px) saturate(110%) brightness(0.25) contrast(100%) !important;
backdrop-filter: var(--zen-urlbar-filter) !important;
}
}