为 Windows 平台添加沉浸式标题栏 (#277)

This commit is contained in:
Mr. Will 2021-02-12 12:03:01 +00:00 committed by GitHub
parent c0c4597cd8
commit 51fc57efe8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 147 additions and 2 deletions

View file

@ -61,4 +61,12 @@ export function initIpcMain(win, store) {
ipcMain.on("settings", (event, options) => {
store.set("settings", options);
});
ipcMain.on("max-restore", () => {
if (win.isMaximized()) {
win.restore();
} else {
win.maximize();
}
});
}