mirror of
https://github.com/rad4day/Waybar.git
synced 2023-12-21 10:22:59 +01:00
Round volume instead of truncating it
This commit is contained in:
parent
d22fd3bbd1
commit
e397f568b7
@ -283,7 +283,7 @@ auto waybar::modules::Wireplumber::update() -> void {
|
|||||||
label_.get_style_context()->remove_class("muted");
|
label_.get_style_context()->remove_class("muted");
|
||||||
}
|
}
|
||||||
|
|
||||||
int vol = volume_ * 100.0;
|
int vol = round(volume_ * 100.0);
|
||||||
std::string markup = fmt::format(fmt::runtime(format), fmt::arg("node_name", node_name_),
|
std::string markup = fmt::format(fmt::runtime(format), fmt::arg("node_name", node_name_),
|
||||||
fmt::arg("volume", vol), fmt::arg("icon", getIcon(vol)));
|
fmt::arg("volume", vol), fmt::arg("icon", getIcon(vol)));
|
||||||
label_.set_markup(markup);
|
label_.set_markup(markup);
|
||||||
|
Loading…
Reference in New Issue
Block a user