mirror of
https://github.com/rad4day/Waybar.git
synced 2025-07-13 22:52:30 +02:00
Add "empty" class for Image module when path/exec is returning an empty value.
This commit is contained in:
@ -87,3 +87,4 @@ $path\\n$tooltip
|
|||||||
# STYLE
|
# STYLE
|
||||||
|
|
||||||
- *#image*
|
- *#image*
|
||||||
|
- *#image.empty*
|
||||||
|
@ -63,9 +63,11 @@ auto waybar::modules::Image::update() -> void {
|
|||||||
}
|
}
|
||||||
image_.set(pixbuf);
|
image_.set(pixbuf);
|
||||||
image_.show();
|
image_.show();
|
||||||
|
image_.get_style_context()->remove_class("empty");
|
||||||
} else {
|
} else {
|
||||||
image_.clear();
|
image_.clear();
|
||||||
image_.hide();
|
image_.hide();
|
||||||
|
image_.get_style_context()->add_class("empty");
|
||||||
}
|
}
|
||||||
|
|
||||||
AModule::update();
|
AModule::update();
|
||||||
|
Reference in New Issue
Block a user