Merge pull request #2859 from Sryther/master
Add "empty" class for Image module when path/exec is returning an empty value.
This commit is contained in:
commit
8e2fa0fdbd
|
@ -87,3 +87,4 @@ $path\\n$tooltip
|
|||
# STYLE
|
||||
|
||||
- *#image*
|
||||
- *#image.empty*
|
||||
|
|
|
@ -63,9 +63,11 @@ auto waybar::modules::Image::update() -> void {
|
|||
}
|
||||
image_.set(pixbuf);
|
||||
image_.show();
|
||||
image_.get_style_context()->remove_class("empty");
|
||||
} else {
|
||||
image_.clear();
|
||||
image_.hide();
|
||||
image_.get_style_context()->add_class("empty");
|
||||
}
|
||||
|
||||
AModule::update();
|
||||
|
|
Loading…
Reference in New Issue