Skip to content

Commit

Permalink
fix center
Browse files Browse the repository at this point in the history
  • Loading branch information
lacymorrow committed May 19, 2020
1 parent bbfa635 commit f6ad462
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/index.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/index.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 12 additions & 1 deletion src/main.js
Expand Up @@ -258,8 +258,19 @@ const centerWindow = () => {
mainWindow.hide()
mainWindow.center()
const bounds = mainWindow.getBounds()

// Recenter bounds because electron isn't perfect
mainWindow.setBounds( { x: bounds.x - 10, y: bounds.y + 250 } )
if ( is.macos ) {

mainWindow.setBounds( { x: bounds.x, y: bounds.y + 250 } )

} else {

mainWindow.setBounds( { x: bounds.x, y: bounds.y + 130 } )

}


mainWindow.show()
saveBounds()

Expand Down

0 comments on commit f6ad462

Please sign in to comment.