new icon & resource handling

This commit is contained in:
FTCHD
2025-02-02 12:52:06 +02:00
parent a9d9230974
commit 665218a514
21 changed files with 6 additions and 6 deletions
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 MiB

+5 -6
View File
@@ -1,4 +1,3 @@
import { defaultWindowIcon } from '@tauri-apps/api/app'
import { Menu } from '@tauri-apps/api/menu' import { Menu } from '@tauri-apps/api/menu'
import { MenuItem } from '@tauri-apps/api/menu' import { MenuItem } from '@tauri-apps/api/menu'
import { resolveResource } from '@tauri-apps/api/path' import { resolveResource } from '@tauri-apps/api/path'
@@ -72,7 +71,7 @@ export async function initTray(): Promise<void> {
await TrayIcon.new({ await TrayIcon.new({
id: 'main-tray', id: 'main-tray',
icon: (await defaultWindowIcon())!, icon: (await resolveResource('icons/favicon/icon.png'))!,
tooltip: 'Rclone', tooltip: 'Rclone',
menu, menu,
menuOnLeftClick: true, menuOnLeftClick: true,
@@ -85,7 +84,7 @@ export async function initTray(): Promise<void> {
} }
export async function initLoadingTray() { export async function initLoadingTray() {
const iconPath = await resolveResource('icons/favicon/frame_00_delay-0.1s.png') const globeIconPath = await resolveResource('icons/favicon/frame_00_delay-0.1s.png')
const quitItem = await MenuItem.new({ const quitItem = await MenuItem.new({
id: 'quit-loading', id: 'quit-loading',
@@ -106,7 +105,7 @@ export async function initLoadingTray() {
const loadingTray = await TrayIcon.new({ const loadingTray = await TrayIcon.new({
id: 'loading-tray', id: 'loading-tray',
icon: iconPath, icon: globeIconPath,
menu: loadingMenu, menu: loadingMenu,
}) })
@@ -116,10 +115,10 @@ export async function initLoadingTray() {
if (currentIcon > 17) { if (currentIcon > 17) {
currentIcon = 1 currentIcon = 1
} }
const iconPath = await resolveResource( const globeIconPath = await resolveResource(
`icons/favicon/frame_${currentIcon < 10 ? '0' : ''}${currentIcon}_delay-0.1s.png` `icons/favicon/frame_${currentIcon < 10 ? '0' : ''}${currentIcon}_delay-0.1s.png`
) )
await loadingTray?.setIcon(iconPath) await loadingTray?.setIcon(globeIconPath)
currentIcon = currentIcon + 1 currentIcon = currentIcon + 1
}, 200) }, 200)
} }
Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.2 KiB

After

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.6 KiB

After

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.
Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 96 KiB

+1
View File
@@ -41,6 +41,7 @@
"icons/icon.ico" "icons/icon.ico"
], ],
"resources": [ "resources": [
"icons/favicon/icon.png",
"icons/favicon/frame_00_delay-0.1s.png", "icons/favicon/frame_00_delay-0.1s.png",
"icons/favicon/frame_01_delay-0.1s.png", "icons/favicon/frame_01_delay-0.1s.png",
"icons/favicon/frame_02_delay-0.1s.png", "icons/favicon/frame_02_delay-0.1s.png",