display size

pull/5370/head
Your Name 5 months ago
parent 3242c1d0d4
commit f3669c1d13
  1. 22
      apps/remixdesktop/src/main.ts

@ -36,8 +36,8 @@ const windowSet = new Set<BrowserWindow>([]);
export const createWindow = async (dir?: string): Promise<void> => { export const createWindow = async (dir?: string): Promise<void> => {
// Create the browser window. // Create the browser window.
const mainWindow = new BrowserWindow({ const mainWindow = new BrowserWindow({
height: 1900, height: (isE2E ? 1920 : screen.getPrimaryDisplay().size.height * 0.8),
width: 1280, width: (isE2E ? 1080 : screen.getPrimaryDisplay().size.width * 0.8),
frame: true, frame: true,
webPreferences: { webPreferences: {
preload: path.join(__dirname, 'preload.js') preload: path.join(__dirname, 'preload.js')
@ -65,7 +65,7 @@ export const createWindow = async (dir?: string): Promise<void> => {
windowSet.delete(mainWindow) windowSet.delete(mainWindow)
}) })
if(isE2E) if (isE2E)
mainWindow.maximize() mainWindow.maximize()
windowSet.add(mainWindow) windowSet.add(mainWindow)
@ -133,15 +133,15 @@ const commandKeys: Record<string, string> = {
}; };
const menu = [...(process.platform === 'darwin' ? [darwinMenu(commandKeys, execCommand, showAbout)] : []), const menu = [...(process.platform === 'darwin' ? [darwinMenu(commandKeys, execCommand, showAbout)] : []),
FileMenu(commandKeys, execCommand), FileMenu(commandKeys, execCommand),
GitMenu(commandKeys, execCommand), GitMenu(commandKeys, execCommand),
EditMenu(commandKeys, execCommand), EditMenu(commandKeys, execCommand),
ViewMenu(commandKeys, execCommand), ViewMenu(commandKeys, execCommand),
TerminalMenu(commandKeys, execCommand), TerminalMenu(commandKeys, execCommand),
WindowMenu(commandKeys, execCommand, []), WindowMenu(commandKeys, execCommand, []),
HelpMenu(commandKeys, execCommand), HelpMenu(commandKeys, execCommand),
] ]
if(!isE2E || isE2ELocal) if (!isE2E || isE2ELocal)
Menu.setApplicationMenu(Menu.buildFromTemplate(menu)) Menu.setApplicationMenu(Menu.buildFromTemplate(menu))

Loading…
Cancel
Save