mirror of
https://github.com/finos/SymphonyElectron.git
synced 2025-02-25 18:55:29 -06:00
Merge pull request #223 from KiranNiranjan/ELECTRON-196
Electron-196 (Pop-out min-height)
This commit is contained in:
commit
1a848d2c11
@ -40,7 +40,11 @@ let sandboxed = false;
|
|||||||
const preloadMainScript = path.join(__dirname, 'preload/_preloadMain.js');
|
const preloadMainScript = path.join(__dirname, 'preload/_preloadMain.js');
|
||||||
|
|
||||||
const MIN_WIDTH = 300;
|
const MIN_WIDTH = 300;
|
||||||
const MIN_HEIGHT = 600;
|
const MIN_HEIGHT = 300;
|
||||||
|
|
||||||
|
// Default window size for pop-out windows
|
||||||
|
const DEFAULT_WIDTH = 300;
|
||||||
|
const DEFAULT_HEIGHT = 600;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds a window key
|
* Adds a window key
|
||||||
@ -293,8 +297,8 @@ function doCreateMainWindow(initialUrl, initialBounds) {
|
|||||||
let x = 0;
|
let x = 0;
|
||||||
let y = 0;
|
let y = 0;
|
||||||
|
|
||||||
let width = newWinOptions.width || MIN_WIDTH;
|
let width = newWinOptions.width || DEFAULT_WIDTH;
|
||||||
let height = newWinOptions.height || MIN_HEIGHT;
|
let height = newWinOptions.height || DEFAULT_HEIGHT;
|
||||||
|
|
||||||
// try getting x and y position from query parameters
|
// try getting x and y position from query parameters
|
||||||
let query = newWinParsedUrl && querystring.parse(newWinParsedUrl.query);
|
let query = newWinParsedUrl && querystring.parse(newWinParsedUrl.query);
|
||||||
@ -323,8 +327,8 @@ function doCreateMainWindow(initialUrl, initialBounds) {
|
|||||||
/* eslint-disable no-param-reassign */
|
/* eslint-disable no-param-reassign */
|
||||||
newWinOptions.x = x;
|
newWinOptions.x = x;
|
||||||
newWinOptions.y = y;
|
newWinOptions.y = y;
|
||||||
newWinOptions.width = Math.max(width, MIN_WIDTH);
|
newWinOptions.width = Math.max(width, DEFAULT_WIDTH);
|
||||||
newWinOptions.height = Math.max(height, MIN_HEIGHT);
|
newWinOptions.height = Math.max(height, DEFAULT_HEIGHT);
|
||||||
newWinOptions.minWidth = MIN_WIDTH;
|
newWinOptions.minWidth = MIN_WIDTH;
|
||||||
newWinOptions.minHeight = MIN_HEIGHT;
|
newWinOptions.minHeight = MIN_HEIGHT;
|
||||||
newWinOptions.alwaysOnTop = alwaysOnTop;
|
newWinOptions.alwaysOnTop = alwaysOnTop;
|
||||||
|
Loading…
Reference in New Issue
Block a user