Merge pull request #4457 from dmyTRUEk/fix-4455
fix(temperature): critical style not being removed
This commit is contained in:
@ -74,12 +74,14 @@ 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) {
|
||||
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 (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("warning");
|
||||
}
|
||||
}
|
||||
|
||||
if (format.empty()) {
|
||||
|
Reference in New Issue
Block a user