Skip to content

Commit

Permalink
fix windows resizing
Browse files Browse the repository at this point in the history
  • Loading branch information
makio135 authored and makio135 committed Mar 1, 2019
1 parent 733335f commit d4630b5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions desktop/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ app.on('ready', () => {
minHeight: 160,
resizable: true,
icon: __dirname + '/icon.ico',
frame: false,
autoHideMenuBar: true
frame: process.platform !== 'darwin',
skipTaskbar: process.platform === 'darwin',
autoHideMenuBar: process.platform === 'darwin'
})

app.win.loadFile('index.html')
Expand Down
5 changes: 3 additions & 2 deletions desktop/src/scripts/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,9 @@ function addHostLi(host, selected = true) {
// Events
addEventListener('resize', helpers.debounce(e => {
// update config.json
config.width = innerWidth
config.height = innerHeight
const dimensions = app.win.getSize()
config.width = dimensions[0]
config.height = dimensions[1]
config.displayShortcuts = shortcuts.classList.contains('open')
helpers.updateConfig(config)
}, 1000))
Expand Down

0 comments on commit d4630b5

Please sign in to comment.