Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
antSword
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
HuangJunbo
antSword
Commits
90ad7956
Commit
90ad7956
authored
Mar 22, 2021
by
Medicean
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change(Window): 优化窗口关闭逻辑 #245
parent
dc0210d5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
4 deletions
+9
-4
CHANGELOG.md
CHANGELOG.md
+5
-0
app.js
app.js
+3
-3
menubar.js
modules/menubar.js
+1
-1
No files found.
CHANGELOG.md
View file @
90ad7956
...
...
@@ -34,6 +34,11 @@ eg:
> 能够适配所有编码器的Shell比较少, 这个功能就略显鸡肋, 我们决定移除它
### 其它
*
优化窗口关闭逻辑 #245
点击最小化时,不再最小化至系统托盘。点击关闭按钮,最小化至系统托盘。点击托盘菜单中的「退出」程序退出。
## 2021/02/06 `v(2.1.10)`
...
...
app.js
View file @
90ad7956
...
...
@@ -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
)
...
...
modules/menubar.js
View file @
90ad7956
...
...
@@ -283,7 +283,7 @@ class Menubar {
label
:
LANG
[
'tray'
][
'quit'
],
click
:
this
.
app
.
qu
it
.
ex
it
.
bind
(
this
.
app
)
}];
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment