Skip to content

Commit

Permalink
feat(suite): Add parameters for window size (electron) from terminal (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
jvaclavik authored Jan 16, 2025
1 parent 6fd400b commit a26cc38
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/suite-desktop-core/src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,12 @@ const init = async () => {
const computerInfo = await getComputerInfo();
logger.debug('computer', computerInfo);

const winBounds = store.getWinBounds();
const widthArg = parseInt(app.commandLine.getSwitchValue('width'), 10);
const heightArg = parseInt(app.commandLine.getSwitchValue('height'), 10);
const winBounds = {
width: !isNaN(widthArg) ? Math.max(widthArg, MIN_WIDTH) : store.getWinBounds().width,
height: !isNaN(heightArg) ? Math.max(heightArg, MIN_HEIGHT) : store.getWinBounds().height,
};
logger.debug('init', `Create Browser Window (${winBounds.width}x${winBounds.height})`);

// init modules
Expand Down

0 comments on commit a26cc38

Please sign in to comment.