Skip to content

Instantly share code, notes, and snippets.

@hisasann
Created February 3, 2016 10:06
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hisasann/a99b7e4aa5f2c9cfc7eb to your computer and use it in GitHub Desktop.
Save hisasann/a99b7e4aa5f2c9cfc7eb to your computer and use it in GitHub Desktop.
Windows でフルスクリーンする方法
app.on('ready', function() {
var Screen = require('screen');
var size = Screen.getPrimaryDisplay().size; // ディスプレイのサイズを取得する
// Create the browser window.
mainWindow = new BrowserWindow({
left: 0,
top: 0,
// この方法がいまのところ確実、これだと padding が発生しない
width: size.width, // 最大サイズで表示する
height: size.height, // 最大サイズで表示する
transparent: true, // 背景を透明にする
show: true,
frame: false,
resizable: false,
'always-on-top': true // 一番手前に表示する
});
// これだと Windows で Screen の四隅に少し padding ができてしまう
// mainWindow.maximize()
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment