fix(temperature): critical
style not being removed (#4455)
This commit is contained in:
@ -74,13 +74,15 @@ auto waybar::modules::Temperature::update() -> void {
|
||||
if (critical) {
|
||||
format = config_["format-critical"].isString() ? config_["format-critical"].asString() : format;
|
||||
label_.get_style_context()->add_class("critical");
|
||||
} else if (warning) {
|
||||
} else {
|
||||
label_.get_style_context()->remove_class("critical");
|
||||
if (warning) {
|
||||
format = config_["format-warning"].isString() ? config_["format-warning"].asString() : format;
|
||||
label_.get_style_context()->add_class("warning");
|
||||
} else {
|
||||
label_.get_style_context()->remove_class("critical");
|
||||
label_.get_style_context()->remove_class("warning");
|
||||
}
|
||||
}
|
||||
|
||||
if (format.empty()) {
|
||||
event_box_.hide();
|
||||
|
Reference in New Issue
Block a user