添加黑色托盘图标
|
@ -1,6 +1,7 @@
|
||||||
### 新增
|
### 新增
|
||||||
|
|
||||||
- 自定义源新增`version`字段,新增`utils.buffer.bufToString`方法
|
- 自定义源新增`version`字段,新增`utils.buffer.bufToString`方法
|
||||||
|
- 添加黑色托盘图标
|
||||||
|
|
||||||
### 优化
|
### 优化
|
||||||
|
|
||||||
|
|
|
@ -7,12 +7,17 @@ let themeId = null
|
||||||
const themeList = [
|
const themeList = [
|
||||||
{
|
{
|
||||||
id: 0,
|
id: 0,
|
||||||
fileName: 'tray0Template',
|
fileName: 'trayTemplate',
|
||||||
isNative: true,
|
isNative: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 1,
|
id: 1,
|
||||||
fileName: 'tray1Template',
|
fileName: 'tray_origin',
|
||||||
|
isNative: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 2,
|
||||||
|
fileName: 'tray_black',
|
||||||
isNative: false,
|
isNative: false,
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
@ -43,8 +48,8 @@ const createTray = () => {
|
||||||
if ((global.modules.tray && !global.modules.tray.isDestroyed()) || !global.appSetting.tray || !global.appSetting.tray.isShow) return
|
if ((global.modules.tray && !global.modules.tray.isDestroyed()) || !global.appSetting.tray || !global.appSetting.tray.isShow) return
|
||||||
|
|
||||||
themeId = global.appSetting.tray.themeId
|
themeId = global.appSetting.tray.themeId
|
||||||
let themeName = (themeList.find(item => item.id === themeId) || themeList[0]).fileName
|
let theme = themeList.find(item => item.id === themeId) || themeList[0]
|
||||||
const iconPath = path.join(global.__static, 'images/tray', themeName + '.png')
|
const iconPath = path.join(global.__static, 'images/tray', theme.fileName + '.png')
|
||||||
|
|
||||||
// 托盘
|
// 托盘
|
||||||
global.modules.tray = new Tray(nativeImage.createFromPath(iconPath))
|
global.modules.tray = new Tray(nativeImage.createFromPath(iconPath))
|
||||||
|
@ -140,7 +145,7 @@ 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 theme = themeList.find(item => item.id === themeId) || themeList[0]
|
||||||
const iconPath = path.join(global.__static, 'images/tray', themeName + '.png')
|
const iconPath = path.join(global.__static, 'images/tray', theme.fileName + '.png')
|
||||||
global.modules.tray.setImage(nativeImage.createFromPath(iconPath))
|
global.modules.tray.setImage(nativeImage.createFromPath(iconPath))
|
||||||
}
|
}
|
||||||
|
|
|
@ -120,6 +120,7 @@
|
||||||
"other_resource_cache_clear_btn": "Clear resource cache",
|
"other_resource_cache_clear_btn": "Clear resource cache",
|
||||||
"other_resource_cache_label": "The software has used cache size: ",
|
"other_resource_cache_label": "The software has used cache size: ",
|
||||||
"other_tray_theme": "Tray Icon Style",
|
"other_tray_theme": "Tray Icon Style",
|
||||||
|
"other_tray_theme_black": "Black Color",
|
||||||
"other_tray_theme_native": "Solid Color",
|
"other_tray_theme_native": "Solid Color",
|
||||||
"other_tray_theme_origin": "Primary Color",
|
"other_tray_theme_origin": "Primary Color",
|
||||||
"play": "Play",
|
"play": "Play",
|
||||||
|
|
|
@ -120,6 +120,7 @@
|
||||||
"other_resource_cache_clear_btn": "清理资源缓存",
|
"other_resource_cache_clear_btn": "清理资源缓存",
|
||||||
"other_resource_cache_label": "软件已使用缓存大小:",
|
"other_resource_cache_label": "软件已使用缓存大小:",
|
||||||
"other_tray_theme": "托盘图标样式",
|
"other_tray_theme": "托盘图标样式",
|
||||||
|
"other_tray_theme_black": "黑色",
|
||||||
"other_tray_theme_native": "纯色",
|
"other_tray_theme_native": "纯色",
|
||||||
"other_tray_theme_origin": "原色",
|
"other_tray_theme_origin": "原色",
|
||||||
"play": "播放设置",
|
"play": "播放设置",
|
||||||
|
|
|
@ -120,6 +120,7 @@
|
||||||
"other_resource_cache_clear_btn": "清理資源緩存",
|
"other_resource_cache_clear_btn": "清理資源緩存",
|
||||||
"other_resource_cache_label": "軟件已使用緩存大小:",
|
"other_resource_cache_label": "軟件已使用緩存大小:",
|
||||||
"other_tray_theme": "托盤圖標樣式",
|
"other_tray_theme": "托盤圖標樣式",
|
||||||
|
"other_tray_theme_black": "黑色",
|
||||||
"other_tray_theme_native": "純色",
|
"other_tray_theme_native": "純色",
|
||||||
"other_tray_theme_origin": "原色",
|
"other_tray_theme_origin": "原色",
|
||||||
"play": "播放設置",
|
"play": "播放設置",
|
||||||
|
|
|
@ -455,6 +455,10 @@ export default {
|
||||||
id: 1,
|
id: 1,
|
||||||
name: 'origin',
|
name: 'origin',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
id: 2,
|
||||||
|
name: 'black',
|
||||||
|
},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
syncEnableTitle() {
|
syncEnableTitle() {
|
||||||
|
|
Before Width: | Height: | Size: 335 B After Width: | Height: | Size: 335 B |
Before Width: | Height: | Size: 416 B After Width: | Height: | Size: 416 B |
Before Width: | Height: | Size: 483 B After Width: | Height: | Size: 483 B |
Before Width: | Height: | Size: 622 B After Width: | Height: | Size: 622 B |
After Width: | Height: | Size: 323 B |
After Width: | Height: | Size: 410 B |
After Width: | Height: | Size: 446 B |
After Width: | Height: | Size: 577 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 417 B After Width: | Height: | Size: 417 B |
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 770 B After Width: | Height: | Size: 770 B |