feat(vibrancy): demo implementation

This commit is contained in:
Elian Doran 2024-12-10 00:03:14 +02:00
parent 018557bb57
commit 0c7537d853
No known key found for this signature in database
4 changed files with 16 additions and 8 deletions

8
package-lock.json generated
View File

@ -143,7 +143,7 @@
"@types/xml2js": "0.4.14", "@types/xml2js": "0.4.14",
"@types/yargs": "17.0.33", "@types/yargs": "17.0.33",
"cross-env": "7.0.3", "cross-env": "7.0.3",
"electron": "31.3.1", "electron": "33.2.1",
"electron-packager": "17.1.2", "electron-packager": "17.1.2",
"electron-rebuild": "3.2.9", "electron-rebuild": "3.2.9",
"esm": "3.2.25", "esm": "3.2.25",
@ -7571,9 +7571,9 @@
} }
}, },
"node_modules/electron": { "node_modules/electron": {
"version": "31.3.1", "version": "33.2.1",
"resolved": "https://registry.npmjs.org/electron/-/electron-31.3.1.tgz", "resolved": "https://registry.npmjs.org/electron/-/electron-33.2.1.tgz",
"integrity": "sha512-9fiuWlRhBfygtcT+auRd/WdBK/f8LZZcrpx0RjpXhH2DPTP/PfnkC4JB1PW55qCbGbh4wAgkYbf4ExIag8oGCA==", "integrity": "sha512-SG/nmSsK9Qg1p6wAW+ZfqU+AV8cmXMTIklUL18NnOKfZLlum4ZsDoVdmmmlL39ZmeCaq27dr7CgslRPahfoVJg==",
"dev": true, "dev": true,
"hasInstallScript": true, "hasInstallScript": true,
"dependencies": { "dependencies": {

View File

@ -183,7 +183,7 @@
"@types/xml2js": "0.4.14", "@types/xml2js": "0.4.14",
"@types/yargs": "17.0.33", "@types/yargs": "17.0.33",
"cross-env": "7.0.3", "cross-env": "7.0.3",
"electron": "31.3.1", "electron": "33.2.1",
"electron-packager": "17.1.2", "electron-packager": "17.1.2",
"electron-rebuild": "3.2.9", "electron-rebuild": "3.2.9",
"esm": "3.2.25", "esm": "3.2.25",

View File

@ -437,8 +437,12 @@ body.background-effects.platform-win32.layout-vertical {
--background-material: mica; --background-material: mica;
} }
body.background-effects.platform-win32, body.background-effects.platform-darwin.layout-horizontal {
body.background-effects.platform-win32 #root-widget, --left-pane-background-color: transparent;
}
body.background-effects,
body.background-effects #root-widget,
body.background-effects.platform-win32 #launcher-pane .launcher-button { body.background-effects.platform-win32 #launcher-pane .launcher-button {
background: transparent !important; background: transparent !important;
} }

View File

@ -32,7 +32,7 @@ async function createExtraWindow(extraWindowHash: string) {
spellcheck: spellcheckEnabled spellcheck: spellcheckEnabled
}, },
...getWindowExtraOpts(), ...getWindowExtraOpts(),
icon: getIcon() icon: getIcon(),
}); });
win.setMenuBarVisibility(false); win.setMenuBarVisibility(false);
@ -122,6 +122,10 @@ function getWindowExtraOpts() {
if (isMac) { if (isMac) {
extraOpts.titleBarStyle = "hiddenInset"; extraOpts.titleBarStyle = "hiddenInset";
extraOpts.titleBarOverlay = true; extraOpts.titleBarOverlay = true;
extraOpts.transparent = true;
extraOpts.backgroundColor = "#00000000"; // transparent hexadecimal or anything with transparency,
extraOpts.vibrancy = "under-window", // in my case...
extraOpts.visualEffectState = "followWindow";
} else if (isWindows) { } else if (isWindows) {
extraOpts.titleBarStyle = "hidden"; extraOpts.titleBarStyle = "hidden";
extraOpts.titleBarOverlay = true; extraOpts.titleBarOverlay = true;