Skip to content

Commit

Permalink
fix: remove menu bar from about window (and others)
Browse files Browse the repository at this point in the history
  • Loading branch information
Steph Tyszka committed Jul 24, 2019
1 parent 3a0a300 commit 13d63ad
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
"type": "git",
"url": "https://github.com/graasp/graasp-desktop"
},
"bugs": {
"url": "https://github.com/graasp/graasp-desktop/issues"
},
"scripts": {
"dev": "yarn react-scripts start",
"build": "env-cmd -f ./.env react-scripts build",
Expand Down
18 changes: 17 additions & 1 deletion public/electron.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,21 @@ const generateMenu = () => {
icon_path: ICON_PATH,
copyright: 'Copyright © 2019 React',
product_name: PRODUCT_NAME,
use_version_info: false,
adjust_window_size: true,
win_options: {
parent: mainWindow,
resizable: false,
minimizable: false,
maximizable: false,
movable: true,
frame: true,
},
// ? automatically showing info from package.json is nice but not translated into different languages
// package_json_dir: path.join(__dirname, '../'),
// bug_link_text: 'Report a bug/issue',
// ? nor is a close button
// show_close_button: 'Close',
});
},
},
Expand Down Expand Up @@ -228,7 +243,8 @@ const generateMenu = () => {
},
];

Menu.setApplicationMenu(Menu.buildFromTemplate(template));
Menu.setApplicationMenu(null);
mainWindow.setMenu(Menu.buildFromTemplate(template));
};

app.on('ready', async () => {
Expand Down

0 comments on commit 13d63ad

Please sign in to comment.