Fixed percentage not getting rounded

pull/1484/head
Erik Reider 2022-03-15 23:03:13 +01:00
parent 6eb187a23e
commit 136b47ce0d
1 changed files with 1 additions and 1 deletions

View File

@ -177,7 +177,7 @@ auto UPower::update() -> void {
// Set percentage // Set percentage
std::string percent_string = std::string percent_string =
displayDeviceValid ? std::to_string(int(percentage) + 0.5) + "%" : ""; displayDeviceValid ? std::to_string(int(percentage + 0.5)) + "%" : "";
label_.set_text(percent_string); label_.set_text(percent_string);
// Set icon // Set icon