adjust tray

This commit is contained in:
pompurin404 2024-08-28 21:53:03 +08:00
parent 4239498f57
commit 5cfcc7e6e9
No known key found for this signature in database
6 changed files with 7 additions and 9 deletions

View File

@ -1,7 +1,5 @@
### New Features
- 调整UI细节
### Bug Fixes
- 修复MacOS托盘绘制网速导致的占用异常
- 修复MacOS系统代理修改失败的问题
- 修复Windows URL Scheme失效的问题
- 修复DNS策略无法删除的问题

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

View File

@ -224,7 +224,7 @@ export async function createTray(): Promise<void> {
tray.setContextMenu(menu)
}
if (process.platform === 'darwin') {
const icon = nativeImage.createFromPath(templateIcon)
const icon = nativeImage.createFromPath(templateIcon).resize({ height: 16 })
icon.setTemplateImage(true)
tray = new Tray(icon)
}

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,5 @@
export function calcTraffic(byte: number): string {
if (byte < 1024) return `${byte} B`
if (byte < 1024) return `${formatNumString(byte)} B`
byte /= 1024
if (byte < 1024) return `${formatNumString(byte)} KB`
byte /= 1024