mirror of
https://github.com/JakeStanger/ironbar.git
synced 2024-11-22 05:34:35 +03:00
fix(tray): image updates lag 1 behind
This commit is contained in:
parent
55c0940e1d
commit
fb1799531b
@ -148,8 +148,8 @@ futures-signals = { version = "0.3.34", optional = true }
|
||||
sysinfo = { version = "0.29.11", optional = true }
|
||||
|
||||
# tray
|
||||
system-tray = { version = "0.2.0", optional = true }
|
||||
system-tray = { version = "0.3.0", optional = true }
|
||||
png = { version = "0.17.14", optional = true }
|
||||
|
||||
# upower
|
||||
upower_dbus = { version = "0.3.2", optional = true }
|
||||
|
@ -211,13 +211,12 @@ fn on_update(
|
||||
}
|
||||
UpdateEvent::Icon(icon) => {
|
||||
if icon.as_ref() != menu_item.icon_name() {
|
||||
menu_item.set_icon_name(icon);
|
||||
match icon::get_image(menu_item, icon_theme, icon_size, prefer_icons) {
|
||||
Ok(image) => menu_item.set_image(&image),
|
||||
Err(_) => menu_item.show_label(),
|
||||
};
|
||||
}
|
||||
|
||||
menu_item.set_icon_name(icon);
|
||||
}
|
||||
UpdateEvent::OverlayIcon(_icon) => {
|
||||
warn!("received unimplemented NewOverlayIcon event");
|
||||
|
Loading…
Reference in New Issue
Block a user