fix Linter errors

This commit is contained in:
kennypm 2022-07-19 21:53:32 -04:00
parent 23eaffc04b
commit 02df861829

View File

@ -64,8 +64,7 @@ auto waybar::modules::JACK::update() -> void {
} else } else
format = "DSP {load}%"; format = "DSP {load}%";
if (!label_.get_style_context()->has_class(state)) if (!label_.get_style_context()->has_class(state)) label_.get_style_context()->add_class(state);
label_.get_style_context()->add_class(state);
state_ = state; state_ = state;
label_.set_markup(fmt::format(format, fmt::arg("load", std::round(load)), label_.set_markup(fmt::format(format, fmt::arg("load", std::round(load)),
@ -76,11 +75,10 @@ auto waybar::modules::JACK::update() -> void {
if (tooltipEnabled()) { if (tooltipEnabled()) {
std::string tooltip_format = "{bufsize}/{samplerate} {latency}ms"; std::string tooltip_format = "{bufsize}/{samplerate} {latency}ms";
if (config_["tooltip-format"].isString()) tooltip_format = config_["tooltip-format"].asString(); if (config_["tooltip-format"].isString()) tooltip_format = config_["tooltip-format"].asString();
label_.set_tooltip_text(fmt::format(tooltip_format, fmt::arg("load", std::round(load)), label_.set_tooltip_text(fmt::format(
fmt::arg("bufsize", bufsize_), tooltip_format, fmt::arg("load", std::round(load)), fmt::arg("bufsize", bufsize_),
fmt::arg("samplerate", samplerate_), fmt::arg("samplerate", samplerate_), fmt::arg("latency", fmt::format("{:.2f}", latency)),
fmt::arg("latency", fmt::format("{:.2f}", latency)), fmt::arg("xruns", xruns_)));
fmt::arg("xruns", xruns_)));
} }