Skip to content

Refactor: use fmt format for detailed view cpu graph/usage draw#1529

Merged
deckstose merged 1 commit intoaristocratos:mainfrom
vandabbin:fix-detailed-cpu-usage-truncate
Feb 11, 2026
Merged

Refactor: use fmt format for detailed view cpu graph/usage draw#1529
deckstose merged 1 commit intoaristocratos:mainfrom
vandabbin:fix-detailed-cpu-usage-truncate

Conversation

@vandabbin
Copy link
Copy Markdown
Contributor

@vandabbin vandabbin commented Feb 7, 2026

Original aim was to solve #389, however after some testing I was able to make 4 digit percentages show without being truncated in the detailed view cpu percentage. Maybe the problem just doesn't show for me. After realizing that my attempted fix didn't actually change anything other then to use fmt::format for decimal precision instead of truncating the string I decided to just change the goal of this PR.

Instead of truncating cpu_str to 4 characters (and then removing the decimal if it is left at the end) this uses fmt format with variable precision similar to other numeric displays (ex. cpu watts)

@vandabbin vandabbin marked this pull request as draft February 7, 2026 23:11
@vandabbin vandabbin force-pushed the fix-detailed-cpu-usage-truncate branch from 01747d9 to c4213c5 Compare February 7, 2026 23:44
@vandabbin vandabbin marked this pull request as ready for review February 7, 2026 23:46
@vandabbin vandabbin changed the title fix truncated cpu usage in detailed view if more than 3 digits Refactor: use fmt format for detailed view cpu graph/usage draw Feb 7, 2026
@deckstose deckstose merged commit 09bd0cd into aristocratos:main Feb 11, 2026
43 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants