feat: add dynamic tray icon with connected/disconnected states and green checkmark badge

Add png dependency and tauri image-png feature to support custom tray icon rendering. Load base disconnected icon from bundled PNG and generate connected variant with green circular badge containing white checkmark overlay. Implement draw_check_badge, draw_line, and blend_pixel helpers using Bresenham's line algorithm for badge rendering. Store both icon variants and TrayIcon reference in TrayState and update icon
This commit is contained in:
2026-03-18 10:28:03 +01:00
parent 9f32c273e0
commit 799bc6550e
2 changed files with 131 additions and 9 deletions

View File

@@ -14,9 +14,10 @@ tauri-build = { version = "2.5.5" }
[dependencies]
base64 = "0.22"
png = "0.17"
rand_core = { version = "0.6", features = ["getrandom"] }
reqwest = { version = "0.12", default-features = false, features = ["json", "rustls-tls"] }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
tauri = { version = "2.10.1", features = ["tray-icon"] }
tauri = { version = "2.10.1", features = ["tray-icon", "image-png"] }
x25519-dalek = { version = "2.0", features = ["static_secrets"] }