调整图标尺寸

pull/733/head
lyswhut 2021-10-27 14:21:32 +08:00
parent 34825b5063
commit b7fb3cd208
17 changed files with 9 additions and 8 deletions

View File

@ -90,12 +90,12 @@
"./licenses" "./licenses"
], ],
"win": { "win": {
"icon": "./resources/icons/256x256.ico", "icon": "./resources/icons",
"legalTrademarks": "lyswhut", "legalTrademarks": "lyswhut",
"artifactName": "${productName} v${version} ${env.ARCH} ${env.TARGET}.${ext}" "artifactName": "${productName} v${version} ${env.ARCH} ${env.TARGET}.${ext}"
}, },
"mac": { "mac": {
"icon": "./resources/icons/512x512.icns", "icon": "./resources/icons",
"category": "public.app-category.music" "category": "public.app-category.music"
}, },
"linux": { "linux": {

View File

@ -9,6 +9,7 @@
- 优化进入、离开播放详情页的性能 - 优化进入、离开播放详情页的性能
- 大幅优化我的列表、下载、歌单、排行榜列表性能,现在即使同一列表内的歌曲很多时也不会卡顿了 - 大幅优化我的列表、下载、歌单、排行榜列表性能,现在即使同一列表内的歌曲很多时也不会卡顿了
- 兼容桌面歌词以触摸的方式移动、调整大小 - 兼容桌面歌词以触摸的方式移动、调整大小
- 调整图标尺寸
### 修复 ### 修复

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.4 KiB

BIN
resources/icons/256x256.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

BIN
resources/icons/32x32.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 906 B

BIN
resources/icons/40x40.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
resources/icons/48x48.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 17 KiB

BIN
resources/icons/64x64.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

@ -1,5 +1,5 @@
const { app, Tray, Menu } = require('electron') const { app, Tray, Menu, nativeImage } = require('electron')
const { isWin } = require('../../common/utils') // const { isWin } = require('../../common/utils')
const { tray: TRAY_EVENT_NAME, common: COMMON_EVENT_NAME, mainWindow: MAIN_WINDOW_NAME } = require('../events/_name') const { tray: TRAY_EVENT_NAME, common: COMMON_EVENT_NAME, mainWindow: MAIN_WINDOW_NAME } = require('../events/_name')
const path = require('path') const path = require('path')
let isEnableTray = null let isEnableTray = null
@ -44,10 +44,10 @@ const createTray = () => {
themeId = global.appSetting.tray.themeId themeId = global.appSetting.tray.themeId
let themeName = (themeList.find(item => item.id === themeId) || themeList[0]).fileName let themeName = (themeList.find(item => item.id === themeId) || themeList[0]).fileName
const iconPath = path.join(global.__static, 'images/tray', isWin ? themeName + '@2x.ico' : themeName + '.png') const iconPath = path.join(global.__static, 'images/tray', themeName + '.png')
// 托盘 // 托盘
global.modules.tray = new Tray(iconPath) global.modules.tray = new Tray(nativeImage.createFromPath(iconPath))
global.modules.tray.setToolTip('洛雪音乐助手') global.modules.tray.setToolTip('洛雪音乐助手')
createMenu(global.modules.tray) createMenu(global.modules.tray)
@ -141,6 +141,6 @@ const createMenu = tray => {
const setTrayImage = themeId => { const setTrayImage = themeId => {
if (!global.modules.tray) return if (!global.modules.tray) return
let themeName = (themeList.find(item => item.id === themeId) || themeList[0]).fileName let themeName = (themeList.find(item => item.id === themeId) || themeList[0]).fileName
const iconPath = path.join(global.__static, 'images/tray', isWin ? themeName + '@2x.ico' : themeName + '.png') const iconPath = path.join(global.__static, 'images/tray', themeName + '.png')
global.modules.tray.setImage(iconPath) global.modules.tray.setImage(nativeImage.createFromPath(iconPath))
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 359 B

After

Width:  |  Height:  |  Size: 335 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 416 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 483 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 681 B

After

Width:  |  Height:  |  Size: 622 B