Fix "Toggle Fullscreen" not working
win.setFullScreenable() is necessary from Electron v0.36.6. fix #37
This commit is contained in:
@@ -121,10 +121,15 @@ app.on('ready', function() {
|
|||||||
window_options = {};
|
window_options = {};
|
||||||
}
|
}
|
||||||
window_options.icon = path.resolve(__dirname, 'resources/appicon.png');
|
window_options.icon = path.resolve(__dirname, 'resources/appicon.png');
|
||||||
|
window_options.fullScreenable = true;
|
||||||
mainWindow = new BrowserWindow(window_options);
|
mainWindow = new BrowserWindow(window_options);
|
||||||
|
mainWindow.setFullScreenable(true); // fullscreenable option has no effect.
|
||||||
if (window_options.maximized) {
|
if (window_options.maximized) {
|
||||||
mainWindow.maximize();
|
mainWindow.maximize();
|
||||||
}
|
}
|
||||||
|
if (window_options.fullscreen) {
|
||||||
|
mainWindow.setFullScreen(true);
|
||||||
|
}
|
||||||
|
|
||||||
// and load the index.html of the app.
|
// and load the index.html of the app.
|
||||||
mainWindow.loadURL('file://' + __dirname + '/browser/index.html');
|
mainWindow.loadURL('file://' + __dirname + '/browser/index.html');
|
||||||
|
Reference in New Issue
Block a user