Revert "Expand tray menu"

This reverts commit ea52c32400.
This commit is contained in:
TestGifts 2021-02-08 20:25:30 +08:00
parent ea52c32400
commit a473df2afc
7 changed files with 1 additions and 29 deletions

View File

@ -22,54 +22,26 @@ export function createTray(win) {
const contextMenu = Menu.buildFromTemplate([
{
label: "播放/暂停",
icon: "src/icon/play.png",
click: () => {
win.webContents.send("play");
},
},
{
label: "上一首",
icon: "src/icon/left.png",
accelerator: "CmdOrCtrl+Left",
click: () => {
win.webContents.send("previous");
},
},
{
label: "下一首",
icon: "src/icon/right.png",
accelerator: "CmdOrCtrl+Right",
click: () => {
win.webContents.send("next");
},
},
{
label: "循环播放",
icon: "src/icon/repeat.png",
accelerator: "Alt+R",
click: () => {
win.webContents.send("repeat");
},
},
{
label: "加入喜欢",
icon: "src/icon/like.png",
accelerator: "CmdOrCtrl+L",
click: () => {
win.webContents.send("like");
},
},
{
label: "退出",
icon: "src/icon/exit.png",
accelerator: "CmdOrCtrl+W",
click: () => {
app.exit();
},
},
]);
tray.popUpContextMenu(contextMenu);
});
return tray;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 223 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 191 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 308 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 396 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 344 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 218 B