Skip to content
This repository has been archived by the owner on Jun 26, 2023. It is now read-only.

Commit

Permalink
Remove aspect ratio lock
Browse files Browse the repository at this point in the history
  • Loading branch information
qwhex authored and conqeror committed Apr 21, 2021
1 parent e5bc9d5 commit 94d1f50
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions src/main/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,6 @@ if (!app.requestSingleInstanceLock()) {
app.quit()
}

function lockAspectRatioOnMacOS(window: BrowserWindow): void {
// Lock the aspect ratio to 16:9 so the user can scale,
// but not change the height and width independently.
// When fullscreen, it's ignored. Works only on macOS.
// Win support: https://github.com/electron/electron/pull/18306
window.setAspectRatio(ASPECT_RATIO)
}

function createWindow(t: TFunctionMain): BrowserWindow {
// Create the browser window.
const {width, height} = screen.getPrimaryDisplay().workAreaSize
Expand All @@ -87,8 +79,6 @@ function createWindow(t: TFunctionMain): BrowserWindow {

Menu.setApplicationMenu(buildMenu(t))

lockAspectRatioOnMacOS(mainWindow)

const startUrl =
process.env.ELECTRON_START_URL ||
url.format({
Expand Down

0 comments on commit 94d1f50

Please sign in to comment.