Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: avg cpu row incorrect height #1565

Merged
merged 1 commit into from
Aug 19, 2024

Conversation

zebp
Copy link
Contributor

@zebp zebp commented Aug 18, 2024

Description

With the new average CPU row there's a bug where the widget wouldn't fix the height accordingly if the average gauge wasn't already on a new line, causing cores on any system core count isn't divisible by 4 to be cut off.

This is a screenshot of my 14c Macbook Pro having cores cut off before the fix.
image

And here's after the fix on a 16c32t system and the same 14c mac
image

Testing

Tested by enabling average_cpu_row on a system where the core count wasn't divisible by 4 to the UI bug was fixed and by doing the same on a system where the core count is divisible by 4 to ensure there's no breakage.

  • Windows
  • macOS
  • Linux

Checklist

  • Areas your change affects have been linted using rustfmt (cargo fmt)
  • The change has been tested and doesn't appear to cause any unintended breakage
  • Documentation has been added/updated if needed (README.md, help menu, doc pages, etc.)
  • The pull request passes the provided CI pipeline
  • There are no merge conflicts
  • If relevant, new tests were added (don't worry too much about coverage)

Copy link

codecov bot commented Aug 18, 2024

Codecov Report

Attention: Patch coverage is 0% with 5 lines in your changes missing coverage. Please review.

Project coverage is 41.45%. Comparing base (5a00998) to head (47d5833).
Report is 1 commits behind head on main.

Files Patch % Lines
src/canvas.rs 0.00% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1565      +/-   ##
==========================================
- Coverage   41.47%   41.45%   -0.02%     
==========================================
  Files         114      114              
  Lines       17838    17840       +2     
==========================================
- Hits         7398     7396       -2     
- Misses      10440    10444       +4     
Flag Coverage Δ
macos-12 36.72% <0.00%> (-0.01%) ⬇️
ubuntu-latest 43.43% <0.00%> (-0.02%) ⬇️
windows-2019 36.92% <0.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Owner

@ClementTsang ClementTsang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing this.

@ClementTsang ClementTsang merged commit cbe2799 into ClementTsang:main Aug 19, 2024
36 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