This commit is contained in:
2026-03-16 18:15:55 +01:00
parent 1ca6be284e
commit 59a4829ec7
4 changed files with 6 additions and 5 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"
+5 -5
View File
@@ -73,14 +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: try to load icon.ico, fallback to default
#[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 = if std::path::Path::new("icon.ico").exists() {
IconSource::Resource("icon.ico")
} else {
IconSource::Resource("IDI_APPLICATION")
};
let mut tray = TrayItem::new("Ambiligth", icon_source).unwrap();