Fallback formatting when format-paused is missing uses ALabel
With the minimal change the paused state, if format-paused state is not set, will show the Alabel if the Alabel was active.
This commit is contained in:
@@ -137,8 +137,9 @@ void waybar::modules::MPD::setLabel() {
|
|||||||
label_.get_style_context()->add_class("playing");
|
label_.get_style_context()->add_class("playing");
|
||||||
label_.get_style_context()->remove_class("paused");
|
label_.get_style_context()->remove_class("paused");
|
||||||
} else if (paused()) {
|
} else if (paused()) {
|
||||||
format = config_["format-paused"].isString() ? config_["format-paused"].asString()
|
if (config_["format-paused"].isString()) {
|
||||||
: config_["format"].asString();
|
format = config_["format-paused"].asString();
|
||||||
|
}
|
||||||
label_.get_style_context()->add_class("paused");
|
label_.get_style_context()->add_class("paused");
|
||||||
label_.get_style_context()->remove_class("playing");
|
label_.get_style_context()->remove_class("playing");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user