Added zoom factor config value and Electron option

This commit is contained in:
Olexandr Savchuk 2016-12-02 21:05:36 +01:00
parent c949548150
commit a08fa721cf
2 changed files with 4 additions and 3 deletions

View File

@ -11,10 +11,11 @@ var defaults = {
port: 8080,
kioskmode: false,
ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1"],
language: "en",
timeFormat: 24,
units: "metric",
zoom: 1,
modules: [
{

View File

@ -20,9 +20,9 @@ let mainWindow;
function createWindow() {
// Create the browser window.
if (config.kioskmode) {
mainWindow = new BrowserWindow({width: 800, height: 600, x: 0, y: 0, kiosk:true, darkTheme: true, webPreferences: {nodeIntegration: false}});
mainWindow = new BrowserWindow({width: 800, height: 600, x: 0, y: 0, kiosk:true, darkTheme: true, webPreferences: {nodeIntegration: false, zoomFactor: config.zoom}});
} else {
mainWindow = new BrowserWindow({width: 800, height: 600, x: 0, y: 0, fullscreen: true, autoHideMenuBar: true, darkTheme: true, webPreferences: {nodeIntegration: false}});
mainWindow = new BrowserWindow({width: 800, height: 600, x: 0, y: 0, fullscreen: true, autoHideMenuBar: true, darkTheme: true, webPreferences: {nodeIntegration: false, zoomFactor: config.zoom}});
}
// and load the index.html of the app.