Allow hide menu options (uses Escape key)

This commit is contained in:
Araxeus
2021-03-23 15:07:31 +02:00
parent 459ebf7070
commit f1dbe4ab6c
2 changed files with 34 additions and 5 deletions

View File

@ -1,10 +1,21 @@
const customTitlebar = require('custom-electron-titlebar');
const {remote, ipcRenderer} = require('electron');
module.exports = () => {
//const windowProxy = window.open('https://music.youtube.com', null);
const myBar = new customTitlebar.Titlebar({
backgroundColor: customTitlebar.Color.fromHex('#030303'),
itemBackgroundColor: customTitlebar.Color.fromHex('#121212') // #020
itemBackgroundColor: customTitlebar.Color.fromHex('#121212')
});
myBar.updateTitle(' ');
document.title = 'Youtube Music';
};
ipcRenderer.on('updateMenu', function(event, menu) {
//let menu = Menu.buildFromTemplate(template);
//Menu.setApplicationMenu(menu);
if(menu)
myBar.updateMenu(remote.Menu.getApplicationMenu());
else
myBar.updateMenu(null);
});
};