mirror of
https://github.com/heyman/heynote.git
synced 2025-02-16 18:21:02 +01:00
Add some comments
This commit is contained in:
parent
8980e532f2
commit
00c2f21b93
@ -55,11 +55,13 @@ let contentSaved = false
|
|||||||
|
|
||||||
|
|
||||||
async function createWindow() {
|
async function createWindow() {
|
||||||
|
// default window size
|
||||||
let windowConfig = {
|
let windowConfig = {
|
||||||
width: 900,
|
width: 900,
|
||||||
height: 680,
|
height: 680,
|
||||||
isMaximized: false,
|
isMaximized: false,
|
||||||
}
|
}
|
||||||
|
// read any stored window settings from config
|
||||||
Object.assign(windowConfig, CONFIG.get("windowConfig"))
|
Object.assign(windowConfig, CONFIG.get("windowConfig"))
|
||||||
|
|
||||||
win = new BrowserWindow(Object.assign({
|
win = new BrowserWindow(Object.assign({
|
||||||
@ -78,6 +80,8 @@ async function createWindow() {
|
|||||||
},
|
},
|
||||||
|
|
||||||
}, windowConfig))
|
}, windowConfig))
|
||||||
|
|
||||||
|
// maximize window if it was maximized last time
|
||||||
if (windowConfig.isMaximized) {
|
if (windowConfig.isMaximized) {
|
||||||
win.maximize()
|
win.maximize()
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user