Skip to content

Commit 91e5ad5

Browse files
author
ci-bot
committed
set normal res
1 parent ee5d467 commit 91e5ad5

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

apps/remixdesktop/src/main.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,16 @@ export const createWindow = async (dir?: string): Promise<void> => {
4444
if (screen.getPrimaryDisplay().size.width < 2560 || screen.getPrimaryDisplay().size.height < 1440) {
4545
resizeFactor = 1
4646
}
47-
const width = screen.getPrimaryDisplay().size.width * resizeFactor
48-
const height = screen.getPrimaryDisplay().size.height * resizeFactor
47+
const windowWidth = Math.round(screen.getPrimaryDisplay().size.width * resizeFactor)
48+
const windowHeight = Math.round(screen.getPrimaryDisplay().size.height * resizeFactor)
4949

5050
// Create the browser window.
5151
const mainWindow = new BrowserWindow({
52-
width: 1024,
53-
height: 652,
52+
// For normal use, start at ~80% of the primary display; E2E will maximize anyway
53+
width: windowWidth,
54+
height: windowHeight,
55+
minWidth: 1024,
56+
minHeight: 650,
5457
frame: true,
5558
webPreferences: {
5659
preload: path.join(__dirname, 'preload.js'),

0 commit comments

Comments
 (0)