mirror of
https://github.com/wavetermdev/backup.git
synced 2026-08-05 13:57:07 -07:00
Support window blur in addition to transparency (#161)
Adds support for window blur via the Vibrancy feature on macOS and the BackgroundMaterial feature on Windows. The setting has no effect on Linux. If both transparency and blur are set, transparency will take precedence.
This commit is contained in:
@@ -324,8 +324,20 @@ function createBrowserWindow(
|
||||
autoHideMenuBar: true,
|
||||
};
|
||||
const isTransparent = settings?.window?.transparent ?? false;
|
||||
const isBlur = !isTransparent && (settings?.window?.blur ?? false);
|
||||
if (isTransparent) {
|
||||
winOpts.transparent = true;
|
||||
} else if (isBlur) {
|
||||
switch (unamePlatform) {
|
||||
case "win32": {
|
||||
winOpts.backgroundMaterial = "acrylic";
|
||||
break;
|
||||
}
|
||||
case "darwin": {
|
||||
winOpts.vibrancy = "fullscreen-ui";
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
winOpts.backgroundColor = "#222222";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user