Skip to content

Commit

Permalink
Merge pull request #655 from Araxeus/add-always-on-top-option
Browse files Browse the repository at this point in the history
add always-on-top option
  • Loading branch information
th-ch authored Apr 7, 2022
2 parents f98e4ea + 7f08579 commit 48aa3ba
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
4 changes: 4 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
9 changes: 9 additions & 0 deletions menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()
? [
{
Expand Down

0 comments on commit 48aa3ba

Please sign in to comment.