Open Naozumi520 opened 2 years ago
As the title say, the transparent effect will also apply to the title bar when mainWindow show after apply the effect:
Here's a part my code:
let window; window = new BrowserWindow({ title: 'Test', icon: './public/img/favicon.ico', webPreferences: { nodeIntegration: true, contextIsolation: false, backgroundThrottling: false, devTools: false }, resizable: true, width: 1000, height: 600, show: false });
setVibrancy before showing window, the title bar will become transparent but the background still white and it just being blurry :
setVibrancy(window, { effect: 'acrylic', disableOnBlur: true }) window.show(); } });
show the window before setVibrancy fix the issue, but I use did-finish-load as I hope the window only appear when all the component are fully loaded and this break the rules :
Initialize_view.webContents.on('did-finish-load', () => { window.show(); setVibrancy(window, { effect: 'acrylic', disableOnBlur: true }) } }); }
As the title say, the transparent effect will also apply to the title bar when mainWindow show after apply the effect:
Here's a part my code:
setVibrancy before showing window, the title bar will become transparent but the background still white and it just being blurry :
show the window before setVibrancy fix the issue, but I use did-finish-load as I hope the window only appear when all the component are fully loaded and this break the rules :