diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-04-15 15:22:31 +1000 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-04-15 15:22:31 +1000 |
| commit | 45f97d8f94f67657421316f082ac1d4222012691 (patch) | |
| tree | 5d791529fc2cd0e735882d704b1d0882a509f477 /app.tsx | |
| parent | style: lighter backgrounds (diff) | |
| download | caelestia-shell-45f97d8f94f67657421316f082ac1d4222012691.tar.gz caelestia-shell-45f97d8f94f67657421316f082ac1d4222012691.tar.bz2 caelestia-shell-45f97d8f94f67657421316f082ac1d4222012691.zip | |
feat: add low transparency mode
Diffstat (limited to 'app.tsx')
| -rw-r--r-- | app.tsx | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -22,8 +22,11 @@ const isLayer = (name: string) => ["base", "mantle", "crust"].includes(name) || name.startsWith("surface") || name.startsWith("overlay"); const applyTransparency = (name: string, hex: string) => { - if (style.transparency.get() === "off" || !isLayer(name)) return hex; - const amount = style.transparency.get() === "high" ? 0.58 : 0.78; + const mode = style.transparency.get(); + if (mode === "off" || !isLayer(name)) return hex; + let amount = 0.78; + if (mode === "low") amount = 0.88; + else if (mode === "high") amount = 0.58; return `color.change(${hex}, $alpha: ${amount})`; }; |