Skip to content

Commit

Permalink
fix: fix that the music controller is blocked under different zoom ra…
Browse files Browse the repository at this point in the history
…tios of electron
  • Loading branch information
hq001 committed Nov 30, 2020
1 parent 22b261c commit b852272
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/electron/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,15 @@ protocol.registerSchemesAsPrivileged([
])

function createWindow() {
const { width, height } = screen.getPrimaryDisplay().workAreaSize
const { workAreaSize, scaleFactor } = screen.getPrimaryDisplay()
const { width, height } = workAreaSize
const [w, h] = [width * scaleFactor, height * scaleFactor]
// Create the browser window.
win = new BrowserWindow({
width: width / 1.7,
height: height / 1.5,
minWidth: width / 2,
minHeight: height / 2,
width: w / 1.7,
height: h / 1.5,
minWidth: w / 2,
minHeight: h / 2,
useContentSize: true,
frame: false,
titleBarStyle: 'hidden',
Expand Down

0 comments on commit b852272

Please sign in to comment.