Merge pull request #188 from priezz/patch-1

Add an option to hide window frame and controls
This commit is contained in:
Jia Hao 2016-04-21 23:41:11 +08:00
commit ece19efba2
5 changed files with 14 additions and 0 deletions

View File

@ -25,6 +25,7 @@ function createMainWindow(options, onAppQuit, setDockBadge) {
});
const mainWindow = new BrowserWindow({
frame: !options.hideWindowFrame,
width: mainWindowState.width,
height: mainWindowState.height,
x: mainWindowState.x,

View File

@ -246,6 +246,16 @@ Makes the packaged app start in full screen.
Makes the packaged app start maximized.
#### [hide-window-frame]
```
--hide-window-frame
```
Disable window frame and controls
#### [verbose]
```

View File

@ -106,6 +106,7 @@ function selectAppArgs(options) {
insecure: options.insecure,
flashPluginDir: options.flashPluginDir,
fullScreen: options.fullScreen,
hideWindowFrame: options.hideWindowFrame,
maximize: options.maximize,
disableContextMenu: options.disableContextMenu
};

View File

@ -41,6 +41,7 @@ if (require.main === module) {
.option('--inject <value>', 'path to a file to be injected', collect, [])
.option('--full-screen', 'if the app should always be started in full screen')
.option('--maximize', 'if the app should always be started maximized')
.option('--hide-window-frame', 'disable window frame and controls')
.option('--verbose', 'if verbose logs should be displayed')
.option('--disable-context-menu', 'disable the context menu')
.parse(process.argv);

View File

@ -55,6 +55,7 @@ function optionsFactory(inpOptions, callback) {
ignore: 'src',
fullScreen: inpOptions.fullScreen || false,
maximize: inpOptions.maximize || false,
hideWindowFrame: inpOptions.hideWindowFrame,
verbose: inpOptions.verbose,
disableContextMenu: inpOptions.disableContextMenu
};