Advertisement
Guest User

main.js

a guest
Mar 26th, 2016
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 'use strict';
  2.  
  3. const _ipcMain = require('electron').ipcMain;
  4.  
  5. var app = require('app');
  6. var BrowserWindow = require('browser-window');
  7.  
  8. var mainWindow = null;
  9.  
  10. app.on('ready', function() {
  11.   mainWindow = new BrowserWindow({
  12.       width: 396,
  13.       height: 445,
  14.       titleBarStyle: 'hidden',
  15.       resizable: false
  16.   });
  17.  
  18.   mainWindow.loadURL('file://' + __dirname + '/app/index.html');
  19.  
  20.   var session = mainWindow.webContents.session;
  21. });
  22.  
  23. app.on('window-all-closed', app.quit);
  24.  
  25. _ipcMain.on('resize', function(event, width, height) {
  26.   mainWindow.setSize(width, height);
  27.   mainWindow.center();
  28.   mainWindow
  29. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement