Skip to content

Commit

Permalink
Merge pull request #880 from hovancik/fix/mac
Browse files Browse the repository at this point in the history
Improve Preferences window size
  • Loading branch information
hovancik authored Mar 9, 2021
2 parents 26bd543 + f363a21 commit d5b84c4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -785,9 +785,9 @@ function createPreferencesWindow () {
return
}
const modalPath = path.join('file://', __dirname, '/preferences.html')
const maxHeight = (electron.screen
const maxHeight = electron.screen
.getDisplayNearestPoint(electron.screen.getCursorScreenPoint())
.workAreaSize.height - 530) / 2.0 + 490
.workAreaSize.height * 0.9
preferencesWin = new BrowserWindow({
autoHideMenuBar: true,
icon: windowIconPath(),
Expand Down
2 changes: 1 addition & 1 deletion app/preferences.js
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ function setWindowHeight () {
const classes = document.querySelector('body').classList
const height = document.querySelector('body').scrollHeight
if (classes.contains('darwin')) {
remote.getCurrentWindow().setSize(bounds.width, height + 22)
remote.getCurrentWindow().setSize(bounds.width, height + 32)
} else if (classes.contains('win32')) {
remote.getCurrentWindow().setSize(bounds.width, height + 40)
}
Expand Down

0 comments on commit d5b84c4

Please sign in to comment.