添加最小化按钮
This commit is contained in:
parent
6bcea09daf
commit
e89bc85cba
|
@ -449,6 +449,7 @@ export class CodeApplication extends Disposable {
|
|||
this.openInstallWizard(false);
|
||||
}
|
||||
else {
|
||||
this.win.show();
|
||||
this.win.focus();
|
||||
}
|
||||
});
|
||||
|
@ -1384,6 +1385,7 @@ export class CodeApplication extends Disposable {
|
|||
ipcMain.removeAllListeners('kylinide.installWizard.justDownLoad');
|
||||
ipcMain.removeAllListeners('kylinide.installWizard.removeFileLister');
|
||||
ipcMain.removeAllListeners('kylinide.installWizard.show');
|
||||
ipcMain.removeAllListeners('kylinide.installWizard.minw');
|
||||
//读取selectfile.json中selecdir的值,如果值不同,则删除当前的时间戳目录
|
||||
if (updateConfigDir) {
|
||||
console.log("updateConfig:" + updateConfigDir)
|
||||
|
@ -1445,6 +1447,11 @@ export class CodeApplication extends Disposable {
|
|||
this.win.close();
|
||||
resolve(void 0);
|
||||
});
|
||||
//最小化窗口
|
||||
ipcMain.on('kylinide.installWizard.minw', async (evevt) => {
|
||||
if (this.win && this.win != undefined)
|
||||
this.win.minimize();
|
||||
});
|
||||
|
||||
//渲染进程发送删除文件的命令
|
||||
ipcMain.on('kylinide.installWizard.cleanDir', async (event, arg) => {
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
<svg width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg" fill="currentColor"><path fill-rule="evenodd" clip-rule="evenodd" d="M8 8.707l3.646 3.647.708-.707L8.707 8l3.647-3.646-.707-.708L8 7.293 4.354 3.646l-.707.708L7.293 8l-3.646 3.646.707.708L8 8.707z"/></svg>
|
After Width: | Height: | Size: 289 B |
Binary file not shown.
After Width: | Height: | Size: 179 B |
Binary file not shown.
After Width: | Height: | Size: 133 B |
|
@ -104,9 +104,24 @@
|
|||
margin: 5px;
|
||||
}
|
||||
|
||||
.minw {
|
||||
width: 15px;
|
||||
height: 25px;
|
||||
float: right;
|
||||
-webkit-app-region: no-drag;
|
||||
cursor: pointer;
|
||||
margin: 5px;
|
||||
text-align: center;
|
||||
opacity:0.5;
|
||||
background: url(../images/minw.png) no-repeat;
|
||||
display:flex;
|
||||
justify-content:center;
|
||||
align-items:center;
|
||||
background-position:center;
|
||||
|
||||
}
|
||||
.close {
|
||||
width: 25px;
|
||||
width: 20px;
|
||||
height: 25px;
|
||||
float: right;
|
||||
-webkit-app-region: no-drag;
|
||||
|
@ -114,16 +129,21 @@
|
|||
margin: 5px;
|
||||
text-align: center;
|
||||
opacity:0.5;
|
||||
background: url(../images/close_gray.png) no-repeat;
|
||||
background: url(../images/close_white.png) no-repeat;
|
||||
display:flex;
|
||||
justify-content:center;
|
||||
align-items:center;
|
||||
background-position:center;
|
||||
|
||||
}
|
||||
.close:hover{
|
||||
.close:hover , .minw:hover{
|
||||
opacity:1;
|
||||
transform: scale(1.2);
|
||||
}
|
||||
|
||||
.dark .close {
|
||||
background: url(../images/close.png);
|
||||
}
|
||||
/* .dark .close {
|
||||
background: url(../images/close.svg);
|
||||
} */
|
||||
|
||||
/*页面中间区域 start {*/
|
||||
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
<div class="header">
|
||||
<div class="title" id="title"></div>
|
||||
<div class="close" id="closeBtn"></div>
|
||||
<div class="minw" id="minwBtn"></div>
|
||||
</div>
|
||||
<div class="bodycontent">
|
||||
<div class="content">
|
||||
|
|
|
@ -51,8 +51,13 @@ document.getElementById('closeBtn').addEventListener('click', () => {
|
|||
ipcRenderer.send('kylinide.installWizard.closeWizard', { type: "close" });
|
||||
removeAllListeners();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
/**
|
||||
* 窗口最小化按钮动作
|
||||
*/
|
||||
document.getElementById('minwBtn').addEventListener('click', () => {
|
||||
ipcRenderer.send('kylinide.installWizard.minw', { type: "minw" });
|
||||
});
|
||||
|
||||
document.getElementById('helpLink').addEventListener('click', (e) => {
|
||||
|
|
|
@ -2,10 +2,10 @@ const os = require('os');
|
|||
const fs = require('fs');
|
||||
const log4js = require('log4js');
|
||||
|
||||
log4js.configure({
|
||||
appenders: { file: { type: 'file', filename: 'instguide.log' } },
|
||||
categories: { default: { appenders: ['file'], level: 'info' } }
|
||||
});
|
||||
// log4js.configure({
|
||||
// appenders: { file: { type: 'file', filename: 'instguide.log' } },
|
||||
// categories: { default: { appenders: ['file'], level: 'info' } }
|
||||
// });
|
||||
|
||||
// 获取用户目录
|
||||
const userHome = os.homedir();
|
||||
|
|
Loading…
Reference in New Issue