mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-11 10:31:47 +00:00
Merge pull request #655 from Araxeus/add-always-on-top-option
add always-on-top option
This commit is contained in:
4
index.js
4
index.js
@ -165,6 +165,10 @@ function createMainWindow() {
|
||||
win.maximize();
|
||||
}
|
||||
|
||||
if(config.get("options.alwaysOnTop")){
|
||||
win.setAlwaysOnTop(true);
|
||||
}
|
||||
|
||||
const urlToLoad = config.get("options.resumeOnStart")
|
||||
? config.get("url")
|
||||
: config.defaultConfig.url;
|
||||
|
||||
9
menu.js
9
menu.js
@ -113,6 +113,15 @@ const mainMenuTemplate = (win) => {
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
label: "Always on top",
|
||||
type: "checkbox",
|
||||
checked: config.get("options.alwaysOnTop"),
|
||||
click: (item) => {
|
||||
config.setMenuOption("options.alwaysOnTop", item.checked);
|
||||
win.setAlwaysOnTop(item.checked);
|
||||
},
|
||||
},
|
||||
...(is.windows() || is.linux()
|
||||
? [
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user