Skip to content

Build your personal knowledge base with Trilium Notes

feat(desktop): basic vibrancy support

Elian Doran8c0d4cde8637
diff --git a/apps/client/src/desktop.ts b/apps/client/src/desktop.ts
index cb90e998f2..69fff6e96b 100644
--- a/apps/client/src/desktop.ts
+++ b/apps/client/src/desktop.ts
@@ -108,6 +108,10 @@ function initTransparencyEffects(style: CSSStyleDeclaration, currentWindow: Elec
currentWindow.setBackgroundMaterial(foundBgMaterialOption);
}
}
+
+ if (window.glob.platform === "darwin") {
+ currentWindow.setVibrancy("under-window");
+ }
}
/**
diff --git a/apps/server/src/services/window.ts b/apps/server/src/services/window.ts
index 019ec58e8b..af18dafb89 100644
--- a/apps/server/src/services/window.ts
+++ b/apps/server/src/services/window.ts
@@ -241,7 +241,8 @@ function getWindowExtraOpts() {
// Window effects (Mica)
if (optionService.getOptionBool("backgroundEffects")) {
if (isMac) {
- // Vibrancy not yet supported.
+ extraOpts.transparent = true;
+ extraOpts.visualEffectState = "active";
} else if (isWindows) {
extraOpts.backgroundMaterial = "auto";
} else {