icon
This commit is contained in:
@@ -0,0 +1 @@
|
||||
app-icon ICON "icon.ico"
|
||||
+4
-7
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user