mirror of
https://github.com/Zedfrigg/ironbar.git
synced 2025-04-19 19:34:24 +02:00
fix(focused): previous icon does not clear if new icon fails to load
Fixes #169
This commit is contained in:
parent
ac34c05d2e
commit
de3aa5d7b1
1 changed files with 6 additions and 2 deletions
|
@ -115,8 +115,12 @@ impl Module<gtk::Box> for FocusedModule {
|
|||
let icon_theme = icon_theme.clone();
|
||||
context.widget_rx.attach(None, move |(name, id)| {
|
||||
if self.show_icon {
|
||||
ImageProvider::parse(&id, &icon_theme, self.icon_size)
|
||||
.map(|image| image.load_into_image(icon.clone()));
|
||||
match ImageProvider::parse(&id, &icon_theme, self.icon_size)
|
||||
.map(|image| image.load_into_image(icon.clone()))
|
||||
{
|
||||
Some(Ok(_)) => icon.show(),
|
||||
_ => icon.hide(),
|
||||
}
|
||||
}
|
||||
|
||||
if self.show_title {
|
||||
|
|
Loading…
Add table
Reference in a new issue