uiToolbar on the way, screen sized windows by default

This commit is contained in:
bordun 2020-03-03 22:18:16 +01:00
parent a58075c602
commit 5b1913da12
17 changed files with 252 additions and 51 deletions

View file

@ -1,8 +1,9 @@
var path = require('path'),
{BrowserWindow, dialog, shell} = require('electron'),
{BrowserWindow, dialog, shell, screen} = require('electron'),
shortcut = require('electron-localshortcut'),
settings = require('./settings'),
theme = require('./theme')
theme = require('./theme'),
screenSize = screen.getPrimaryDisplay().size
module.exports = function(options={}) {
@ -10,8 +11,8 @@ module.exports = function(options={}) {
var window
window = new BrowserWindow({
width: options.width || 800,
height: options.height || 600,
width: options.width || screenSize.width,
height: options.height || screenSize.height,
title: options.title || settings.read('appName'),
icon: path.resolve(__dirname + '/../assets/logo.png'),
backgroundColor: options.color || theme.backgroundColor,