fix: true glass like the demos

This commit is contained in:
avarayr 2025-07-09 12:08:07 -04:00 committed by GitHub
parent aa9d49136d
commit c0d2331712
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -457,15 +457,9 @@ function createWindows() {
headerLoadOptions.query = { glass: 'true' }; headerLoadOptions.query = { glass: 'true' };
header.loadFile(path.join(__dirname, '../app/header.html'), headerLoadOptions); header.loadFile(path.join(__dirname, '../app/header.html'), headerLoadOptions);
header.webContents.once('did-finish-load', () => { header.webContents.once('did-finish-load', () => {
const viewId = liquidGlass.addView(header.getNativeWindowHandle(), { const viewId = liquidGlass.addView(header.getNativeWindowHandle());
cornerRadius: 12,
tintColor: '#FF00001A', // Red tint
opaque: false,
});
if (viewId !== -1) { if (viewId !== -1) {
liquidGlass.unstable_setVariant(viewId, 2); liquidGlass.unstable_setVariant(viewId, liquidGlass.GlassMaterialVariant.bubbles);
// liquidGlass.unstable_setScrim(viewId, 1);
// liquidGlass.unstable_setSubdued(viewId, 1);
} }
}); });
} }