launcher: add Always on top menu toggle

This commit is contained in:
bordun 2021-04-08 15:31:29 +02:00
parent 95c0103a85
commit 9756e8923d
3 changed files with 21 additions and 0 deletions

View file

@ -30,3 +30,9 @@ if (settings.remote.read('checkForUpdates') && navigator.onLine) {
request.send()
}
if (settings.remote.read('alwaysOnTop')) {
remote.getCurrentWindow().setAlwaysOnTop(true)
}

View file

@ -98,6 +98,18 @@ menu.append(new MenuItem({type: 'submenu' , label: 'Console', submenu: [
menu.append(new MenuItem({
type: 'separator'
}))
menu.append(new MenuItem({
label: 'Always on top',
type: 'checkbox',
checked: settings.remote.read('alwaysOnTop'),
click: (e)=>{
settings.remote.write('alwaysOnTop', e.checked)
remote.getCurrentWindow().setAlwaysOnTop(e.checked)
}
}))
menu.append(new MenuItem({
type: 'separator'
}))
// menu.append(new MenuItem({
// label: 'Restart',
// click: ()=>{