This commit is contained in:
2026-03-16 18:15:55 +01:00
parent 1ca6be284e
commit 31c10d456c
4 changed files with 5 additions and 7 deletions
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 893 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

+1
View File
@@ -0,0 +1 @@
app-icon ICON "icon.ico"
+4 -7
View File
@@ -73,17 +73,14 @@ fn main() {
// Create the tray application
// On Linux: empty string works as a default/no icon
// On Windows: use IconSource::Data with a 1x1 transparent icon
// On Windows: use IDI_APPLICATION (default app icon) to avoid resource issues
#[cfg(unix)]
let icon_source = IconSource::Resource("");
#[cfg(windows)]
let icon_source = IconSource::Data {
rgba: &[0, 0, 0, 0], // 1x1 transparent black pixel
width: 1,
height: 1,
};
let icon_source = IconSource::Resource("#32512"); // IDI_APPLICATION
let mut tray = TrayItem::new("Ambiligth", icon_source).unwrap();
let mut tray = TrayItem::new("Ambiligth", icon_source)
.expect("Failed to create tray icon. On Windows, this may require a valid icon resource.");
let is_running_toggle = is_running.clone();
let restore_on_toggle = settings_arc.restore_on_exit;