diff options
author | Devine Lu Linvega <[email protected]> | 2019-02-17 07:27:31 +0900 |
---|---|---|
committer | Devine Lu Linvega <[email protected]> | 2019-02-17 07:27:34 +0900 |
commit | 802986c337b3c64f8e72f62fe8ff08b5a5da249e (patch) | |
tree | 1f8dfbcd9775981036f94210804e6db821d56555 /desktop/main.js | |
parent | 9e04477879be44f8413a9d97a4a4b6d16d562713 (diff) | |
download | Orca-802986c337b3c64f8e72f62fe8ff08b5a5da249e.tar.gz Orca-802986c337b3c64f8e72f62fe8ff08b5a5da249e.zip |
Fixed linux/win frame issues
Diffstat (limited to 'desktop/main.js')
-rw-r--r-- | desktop/main.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/desktop/main.js b/desktop/main.js index abc6c3a..4c45d6f 100644 --- a/desktop/main.js +++ b/desktop/main.js @@ -16,9 +16,9 @@ app.on('ready', () => { backgroundColor: '#000', resizable: true, icon: __dirname + '/icon.ico', - frame: process.platform === 'win32', - skipTaskbar: process.platform !== 'win32', - autoHideMenuBar: process.platform !== 'win32' + frame: process.platform !== 'darwin', + skipTaskbar: process.platform === 'darwin', + autoHideMenuBar: process.platform === 'darwin' }) app.win.loadURL(`file://${__dirname}/sources/index.html`) @@ -59,10 +59,10 @@ app.toggleFullscreen = function () { } app.toggleVisible = function () { - if (process.platform === 'win32') { - if (!app.win.isMinimized()) { app.win.minimize() } else { app.win.restore() } - } else { + if (process.platform === 'darwin') { if (isShown && !app.win.isFullScreen()) { app.win.hide() } else { app.win.show() } + } else { + if (!app.win.isMinimized()) { app.win.minimize() } else { app.win.restore() } } } |