summaryrefslogtreecommitdiff
path: root/app.tsx
diff options
context:
space:
mode:
author2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-04-15 15:22:31 +1000
committer2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-04-15 15:22:31 +1000
commit45f97d8f94f67657421316f082ac1d4222012691 (patch)
tree5d791529fc2cd0e735882d704b1d0882a509f477 /app.tsx
parentstyle: lighter backgrounds (diff)
downloadcaelestia-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.tsx7
1 files changed, 5 insertions, 2 deletions
diff --git a/app.tsx b/app.tsx
index 88312e1..dcc93d8 100644
--- a/app.tsx
+++ b/app.tsx
@@ -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})`;
};