Skip to content

Commit

Permalink
Merge pull request #2859 from Sryther/master
Browse files Browse the repository at this point in the history
Add "empty" class for Image module when path/exec is returning an empty value.
  • Loading branch information
Alexays authored Jan 23, 2024
2 parents 0d9c492 + 0af8f5c commit 8e2fa0f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions man/waybar-image.5.scd
Original file line number Diff line number Diff line change
Expand Up @@ -87,3 +87,4 @@ $path\\n$tooltip
# STYLE

- *#image*
- *#image.empty*
2 changes: 2 additions & 0 deletions src/modules/image.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 8e2fa0f

Please sign in to comment.