Merge pull request #4874 from GG2R10/fix/cava-silence-fix
fix(cava): remove silent CSS class on reactivation
This commit is contained in:
@ -26,6 +26,7 @@ void waybar::modules::cava::Cava::pause_resume() { backend_->doPauseResume(); }
|
|||||||
auto waybar::modules::cava::Cava::onUpdate(const std::string& input) -> void {
|
auto waybar::modules::cava::Cava::onUpdate(const std::string& input) -> void {
|
||||||
Glib::signal_idle().connect_once([this, input]() {
|
Glib::signal_idle().connect_once([this, input]() {
|
||||||
if (silence_) {
|
if (silence_) {
|
||||||
|
silence_ = false;
|
||||||
label_.get_style_context()->remove_class("silent");
|
label_.get_style_context()->remove_class("silent");
|
||||||
if (!label_.get_style_context()->has_class("updated"))
|
if (!label_.get_style_context()->has_class("updated"))
|
||||||
label_.get_style_context()->add_class("updated");
|
label_.get_style_context()->add_class("updated");
|
||||||
@ -38,7 +39,6 @@ auto waybar::modules::cava::Cava::onUpdate(const std::string& input) -> void {
|
|||||||
label_.show();
|
label_.show();
|
||||||
ALabel::update();
|
ALabel::update();
|
||||||
});
|
});
|
||||||
silence_ = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
auto waybar::modules::cava::Cava::onSilence() -> void {
|
auto waybar::modules::cava::Cava::onSilence() -> void {
|
||||||
|
|||||||
Reference in New Issue
Block a user