mirror of
https://github.com/Zedfrigg/ironbar.git
synced 2025-07-01 02:31:04 +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();
|
let icon_theme = icon_theme.clone();
|
||||||
context.widget_rx.attach(None, move |(name, id)| {
|
context.widget_rx.attach(None, move |(name, id)| {
|
||||||
if self.show_icon {
|
if self.show_icon {
|
||||||
ImageProvider::parse(&id, &icon_theme, self.icon_size)
|
match ImageProvider::parse(&id, &icon_theme, self.icon_size)
|
||||||
.map(|image| image.load_into_image(icon.clone()));
|
.map(|image| image.load_into_image(icon.clone()))
|
||||||
|
{
|
||||||
|
Some(Ok(_)) => icon.show(),
|
||||||
|
_ => icon.hide(),
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if self.show_title {
|
if self.show_title {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue