more tweaks for windoof

master
Michael Ochmann 3 years ago
parent 9b8da8be9e
commit d74650e32e
  1. 2
      package-lock.json
  2. 2
      package.json
  3. 11
      src/WindowManager.js

2
package-lock.json generated

@ -1,6 +1,6 @@
{ {
"name": "ation", "name": "ation",
"version": "0.3.2", "version": "0.3.3",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {

@ -1,6 +1,6 @@
{ {
"name": "ation", "name": "ation",
"version": "0.3.2", "version": "0.3.3",
"description": "a simple presentation software", "description": "a simple presentation software",
"main": "main.js", "main": "main.js",
"scripts": { "scripts": {

@ -25,8 +25,7 @@ class WindowManager {
init() { init() {
this.mainWindow = WindowManager._CreateWindow({ this.mainWindow = WindowManager._CreateWindow({
fullscreen : false, fullscreen : false,
fullscreenable : true, fullscreenable : true
autoHideMenuBar : process.platform === "win32"
}); });
this.windows.settings = WindowManager._CreateWindow({ this.windows.settings = WindowManager._CreateWindow({
height : 300, height : 300,
@ -40,6 +39,14 @@ class WindowManager {
// window, because it would look odd. // window, because it would look odd.
if (["win32", "linux"].includes(process.platform)) { if (["win32", "linux"].includes(process.platform)) {
this.windows.settings.removeMenu(); this.windows.settings.removeMenu();
// we also need to hide the application menu
this.mainWindow.on("enter-full-screen", () => {
this.mainWindow.setAutoHideMenuBar(true);
});
this.mainWindow.on("leave-full-screen", () => {
this.mainWindow.setAutoHideMenuBar(false);
});
} }
this.windows.settings.on("close", event => { this.windows.settings.on("close", event => {

Loading…
Cancel
Save