Commit 90ad7956 authored by Medicean's avatar Medicean

Change(Window): 优化窗口关闭逻辑 #245

parent dc0210d5
......@@ -34,6 +34,11 @@ eg:
> 能够适配所有编码器的Shell比较少, 这个功能就略显鸡肋, 我们决定移除它
### 其它
* 优化窗口关闭逻辑 #245
点击最小化时,不再最小化至系统托盘。点击关闭按钮,最小化至系统托盘。点击托盘菜单中的「退出」程序退出。
## 2021/02/06 `v(2.1.10)`
......
......@@ -71,9 +71,7 @@ app.once('ready', () => {
// 窗口事件监听
mainWindow.on('close', (event) => {
event.preventDefault();
app.exit(0);
}).on('minimize', (event) => {
event.preventDefault();
// app.exit(0);
if (process.platform == 'darwin') {
app.hide();
} else if (process.platform == 'linux') {
......@@ -81,6 +79,8 @@ app.once('ready', () => {
} else {
mainWindow.hide();
}
}).on('minimize', (event) => {
event.preventDefault();
})
.on('resize', reloadUI)
.on('maximize', reloadUI)
......
......@@ -283,7 +283,7 @@ class Menubar {
label: LANG['tray']['quit'],
click: this
.app
.quit
.exit
.bind(this.app)
}];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment