From 908b164996dfd2314f09e11d5c217eae05cf85c9 Mon Sep 17 00:00:00 2001 From: "mr. m" Date: Thu, 12 Mar 2026 12:47:20 +0100 Subject: [PATCH] feat: Allow gradient picker to have less opacity for Windows, b=no-bug, c=workspaces --- .../{gradient-generator.inc => theme-picker.inc} | 8 ++++---- src/browser/base/content/zen-popupset.inc.xhtml | 2 +- src/zen/workspaces/ZenGradientGenerator.mjs | 6 +++--- src/zen/workspaces/zen-gradient-generator.css | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) rename src/browser/base/content/zen-panels/{gradient-generator.inc => theme-picker.inc} (98%) diff --git a/src/browser/base/content/zen-panels/gradient-generator.inc b/src/browser/base/content/zen-panels/theme-picker.inc similarity index 98% rename from src/browser/base/content/zen-panels/gradient-generator.inc rename to src/browser/base/content/zen-panels/theme-picker.inc index a94852e80..ff059d959 100644 --- a/src/browser/base/content/zen-panels/gradient-generator.inc +++ b/src/browser/base/content/zen-panels/theme-picker.inc @@ -89,7 +89,7 @@ # They must all go from the middle to the right side. They must always stay verically centered. # And reach to 180 on the right side, meaning we must divide the width in 16 segments. + data-position="340,180" style="background: rgb(224, 224, 224);"> diff --git a/src/browser/base/content/zen-popupset.inc.xhtml b/src/browser/base/content/zen-popupset.inc.xhtml index e58a85c4c..9d6e1c06c 100644 --- a/src/browser/base/content/zen-popupset.inc.xhtml +++ b/src/browser/base/content/zen-popupset.inc.xhtml @@ -2,7 +2,7 @@ # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. -#include zen-panels/gradient-generator.inc +#include zen-panels/theme-picker.inc #include zen-panels/emojis-picker.inc #include zen-panels/folders-search.inc #include zen-panels/site-data.inc diff --git a/src/zen/workspaces/ZenGradientGenerator.mjs b/src/zen/workspaces/ZenGradientGenerator.mjs index 885141ae6..d13c25433 100644 --- a/src/zen/workspaces/ZenGradientGenerator.mjs +++ b/src/zen/workspaces/ZenGradientGenerator.mjs @@ -1257,8 +1257,8 @@ export class nsZenThemePicker extends nsZenMultiWindowFeature { let colorToBlend; let colorToBlendOpacity; if (this.isMica) { - colorToBlend = !this.isDarkMode ? [0, 0, 0] : [255, 255, 255]; - colorToBlendOpacity = 0.35; + colorToBlend = this.isDarkMode ? [0, 0, 0] : [255, 255, 255]; + colorToBlendOpacity = 0.25; } else if (AppConstants.platform === "macosx") { colorToBlend = [255, 255, 255]; colorToBlendOpacity = 0.35; @@ -1271,7 +1271,7 @@ export class nsZenThemePicker extends nsZenMultiWindowFeature { colorToBlendOpacity * (1 - (opacity + lazy.MIN_OPACITY)) ); baseColor = this.blendColors(baseColor, colorToBlend, blendedAlpha * 100); - if (AppConstants.platform !== "macosx") { + if (!this.canBeTransparent) { opacity += colorToBlendOpacity * (1 - opacity); } } diff --git a/src/zen/workspaces/zen-gradient-generator.css b/src/zen/workspaces/zen-gradient-generator.css index 9ba5bf9c5..01bab6aba 100644 --- a/src/zen/workspaces/zen-gradient-generator.css +++ b/src/zen/workspaces/zen-gradient-generator.css @@ -274,7 +274,7 @@ &:first-of-type { width: 38px; height: 38px; - border-width: 4px; + border-width: 6px; pointer-events: all; transition: transform 0.2s; z-index: 999;