mirror of
https://github.com/zen-browser/desktop.git
synced 2026-05-20 03:51:20 +00:00
no-bug: Use a different blur for the urlbar, depending on the theme (gh-13562)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -4,3 +4,4 @@
|
||||
|
||||
color-scheme: dark;
|
||||
--zen-urlbar-outline-offset: -2px;
|
||||
--zen-urlbar-filter: blur(40px) saturate(110%) brightness(25%) contrast(100%);
|
||||
|
||||
@@ -4,3 +4,4 @@
|
||||
|
||||
color-scheme: light;
|
||||
--zen-urlbar-outline-offset: 0px;
|
||||
--zen-urlbar-filter: blur(40px) saturate(110%) brightness(75%) contrast(100%);
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user