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

Remove aspect ratio lock #68

Merged
merged 1 commit into from
Apr 21, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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