Conversation
Set the IEC_UNITS flag separately for the value but refrain using it for the unit string. Memory sizes unit strings are always shown without the lowercase letter I eg. "MB" or "GB" instead of "MiB" or "GiB". Rationale for this commit is to not have your average user wonder what that lowercase letter I depicts.
Also update util memory size format function to: - show the full format with single decimal place eg. "3.1 MB" unless, - the size is an exact factor/power of 2 then show eg. "32 GB". This is to show accurate total physical memory available eg. "32 GB" instead of previously showing "31.2 GiB" which libgtop would report.
ryonakano
reviewed
Sep 16, 2026
Member
|
Could you resolve the conflicts? |
Member
Author
@ryonakano done! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Observe the screenshots where before it would show eg. total memory as "125.4 GiB" and other memory size units in IEC format eg. "MiB" with the lowercase letter I.
This PR proposes a more user-friendly format to always show the units eg. "MB" or "GB" and if the size is an exact factor/power of 2 then exclude the decimal place eg. "128 GB" instead of "128.0 GB" otherwise show eg. "3.1 MB".
This is similar to elementary/settings-system#251 and elementary/settings-system#252 which can be considered prior art.
BEFORE:

AFTER:
