Merge pull request #826 from Markaos/fix-typo

network: fix typo - update tooltip only when it changes
This commit is contained in:
Alex 2020-08-19 11:02:49 +02:00 committed by GitHub
commit 447fad34c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -287,7 +287,7 @@ auto waybar::modules::Network::update() -> void {
fmt::arg("bandwidthUpBits", pow_format(bandwidth_up * 8ull / interval_.count(), "b/s")), fmt::arg("bandwidthUpBits", pow_format(bandwidth_up * 8ull / interval_.count(), "b/s")),
fmt::arg("bandwidthDownOctets", pow_format(bandwidth_down / interval_.count(), "o/s")), fmt::arg("bandwidthDownOctets", pow_format(bandwidth_down / interval_.count(), "o/s")),
fmt::arg("bandwidthUpOctets", pow_format(bandwidth_up / interval_.count(), "o/s"))); fmt::arg("bandwidthUpOctets", pow_format(bandwidth_up / interval_.count(), "o/s")));
if (label_.get_tooltip_text() != text) { if (label_.get_tooltip_text() != tooltip_text) {
label_.set_tooltip_text(tooltip_text); label_.set_tooltip_text(tooltip_text);
} }
} else if (label_.get_tooltip_text() != text) { } else if (label_.get_tooltip_text() != text) {