Fixed percentage not getting rounded
parent
6eb187a23e
commit
136b47ce0d
|
@ -177,7 +177,7 @@ auto UPower::update() -> void {
|
|||
|
||||
// Set percentage
|
||||
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);
|
||||
|
||||
// Set icon
|
||||
|
|
Loading…
Reference in New Issue