Fix clang-format

This commit is contained in:
Alex
2026-07-03 23:52:13 +02:00
parent 846ce3e1a4
commit 885ced58fc
+2 -5
View File
@@ -193,7 +193,8 @@ auto waybar::modules::Custom::update() -> void {
auto str = fmt::format(fmt::runtime(format_), fmt::arg("text", text_), fmt::arg("alt", alt_), auto str = fmt::format(fmt::runtime(format_), fmt::arg("text", text_), fmt::arg("alt", alt_),
fmt::arg("icon", getIcon(percentage_, alt_)), fmt::arg("icon", getIcon(percentage_, alt_)),
fmt::arg("percentage", percentage_)); fmt::arg("percentage", percentage_));
if ((config_["hide-empty-text"].asBool() && text_.empty()) || (str.empty() && image_path_.empty() && image_name_.empty())) { if ((config_["hide-empty-text"].asBool() && text_.empty()) ||
(str.empty() && image_path_.empty() && image_name_.empty())) {
event_box_.hide(); event_box_.hide();
} else { } else {
label_.set_markup(str); label_.set_markup(str);
@@ -241,7 +242,6 @@ auto waybar::modules::Custom::update() -> void {
image_.set_visible(!image_name_.empty() || !image_path_.empty()); image_.set_visible(!image_name_.empty() || !image_path_.empty());
label_.set_visible(!str.empty()); label_.set_visible(!str.empty());
} }
} catch (const fmt::format_error& e) { } catch (const fmt::format_error& e) {
if (std::strcmp(e.what(), "cannot switch from manual to automatic argument indexing") != 0) if (std::strcmp(e.what(), "cannot switch from manual to automatic argument indexing") != 0)
@@ -251,9 +251,6 @@ auto waybar::modules::Custom::update() -> void {
"mixing manual and automatic argument indexing is no longer supported; " "mixing manual and automatic argument indexing is no longer supported; "
"try replacing \"{}\" with \"{text}\" in your format specifier"); "try replacing \"{}\" with \"{text}\" in your format specifier");
} }
} }
// Call parent update // Call parent update
AIconLabel::update(); AIconLabel::update();