Bug 452409 - Drop ",0" from "100,0%" displayed in widgets like "Total CPU/disk/memory/etc. usage"
Summary: Drop ",0" from "100,0%" displayed in widgets like "Total CPU/disk/memory/etc....
Status: RESOLVED INTENTIONAL
Alias: None
Product: plasma-systemmonitor
Classification: Applications
Component: general (other bugs)
Version First Reported In: 5.24.4
Platform: Other Linux
: NOR minor
Target Milestone: ---
Assignee: KSysGuard Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-04-08 16:20 UTC by postix
Modified: 2025-09-24 18:02 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
Screenshot of the "Total CPU usage" widget, showing "100,0%" (21.86 KB, image/png)
2022-04-08 16:20 UTC, postix
Details

Note You need to log in before you can comment on or make changes to this bug.
Description postix 2022-04-08 16:20:43 UTC
Created attachment 148051 [details]
Screenshot of the "Total CPU usage" widget, showing "100,0%"

Since 100% is the absolute maximum, the ",0" does not give any additional information. The benefit from dropping it is having a shorter text, which may better fit into smaller widget and is easier to grasp:

99,9%
100%
100,0%
Comment 1 Arjen Hiemstra 2025-09-24 14:18:32 UTC
The code responsible for formatting numbers has no way of determining that 100% is actually the maximum and there is no reason to assume it is, as the same code is used to show things like unscaled process CPU usage. While it's theoretically possible to add that, I don't think it's worth the effort.
Comment 2 postix 2025-09-24 18:02:11 UTC
>  While it's theoretically possible to add that, I don't think it's worth the effort.

The caller of the function knows the maximum I suppose, so it would only be needed to be passed with the function call for formatting the numbers, right? IMO it's worth the little effort. :) Would a PR be welcome?