From 60a77413dfd813152eb77ebeabe2b37b53c70bbf Mon Sep 17 00:00:00 2001 From: "mr. m" <91018726+mr-cheffy@users.noreply.github.com> Date: Tue, 5 May 2026 00:13:14 +0200 Subject: [PATCH] no-bug: Use a different blur for the urlbar, depending on the theme (gh-13562) --- prefs/zen/view.yaml | 3 +++ .../components/customizableui/CustomizableUI-sys-mjs.patch | 4 ++-- src/zen/common/styles/schemes/dark.inc.css | 1 + src/zen/common/styles/schemes/light.inc.css | 1 + src/zen/common/styles/zen-omnibox.css | 6 +++--- 5 files changed, 10 insertions(+), 5 deletions(-) diff --git a/prefs/zen/view.yaml b/prefs/zen/view.yaml index f5a54e27c..4e84831c8 100644 --- a/prefs/zen/view.yaml +++ b/prefs/zen/view.yaml @@ -61,5 +61,8 @@ - name: zen.view.overflow-webext-toolbar value: "@IS_TWILIGHT@" +- name: zen.view.overflow-webext-toolbar-threshold + value: 60 + - name: zen.view.enable-loading-indicator value: true diff --git a/src/browser/components/customizableui/CustomizableUI-sys-mjs.patch b/src/browser/components/customizableui/CustomizableUI-sys-mjs.patch index b1a3381da..f3451e82f 100644 --- a/src/browser/components/customizableui/CustomizableUI-sys-mjs.patch +++ b/src/browser/components/customizableui/CustomizableUI-sys-mjs.patch @@ -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) { diff --git a/src/zen/common/styles/schemes/dark.inc.css b/src/zen/common/styles/schemes/dark.inc.css index 9b20f1a6a..e66510082 100644 --- a/src/zen/common/styles/schemes/dark.inc.css +++ b/src/zen/common/styles/schemes/dark.inc.css @@ -4,3 +4,4 @@ color-scheme: dark; --zen-urlbar-outline-offset: -2px; +--zen-urlbar-filter: blur(40px) saturate(110%) brightness(25%) contrast(100%); diff --git a/src/zen/common/styles/schemes/light.inc.css b/src/zen/common/styles/schemes/light.inc.css index d010f2f19..81daec9b5 100644 --- a/src/zen/common/styles/schemes/light.inc.css +++ b/src/zen/common/styles/schemes/light.inc.css @@ -4,3 +4,4 @@ color-scheme: light; --zen-urlbar-outline-offset: 0px; +--zen-urlbar-filter: blur(40px) saturate(110%) brightness(75%) contrast(100%); diff --git a/src/zen/common/styles/zen-omnibox.css b/src/zen/common/styles/zen-omnibox.css index a0c448675..373598eb2 100644 --- a/src/zen/common/styles/zen-omnibox.css +++ b/src/zen/common/styles/zen-omnibox.css @@ -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; } }