mirror of
				https://github.com/rad4day/Waybar.git
				synced 2025-11-04 09:42:42 +01:00 
			
		
		
		
	Fixed percentage not getting rounded
This commit is contained in:
		@@ -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
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user