Skip to content

Fix #6546: Fixed Display of Misc Award Images; Upgraded Award Image Scaling #6583

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

Merged
merged 4 commits into from
Apr 11, 2025

Conversation

IllianiBird
Copy link
Collaborator

  • Fixed misc image count to return misc images and not medals.
  • Added logging to warn if image files (ribbons, medals, misc) are missing.
  • Adjusted the maximum number of ribbon awards per row from 4 to 3 for better display with the new scaling tech.
  • Introduced scaleImage method in ImageUtilities. This is essentially a duplicate of scaleImageIcon, with reused components separated into a shared method.
  • Replaced award image scaling in PersonViewPanel with the new scaleImage method from ImageUtilities.

Fix #6546

Dev Notes

Users may notice some images appearing different once this has been merged, that will be because we are now respecting the image's aspect ratio, rather than using fixed values.

- Fixed misc image count to return misc images and not medals.
- Added logging to warn if image files (ribbons, medals, misc) are missing.
- Adjusted the maximum number of ribbon awards per row from 4 to 3 for better display with the new scaling tech.
- Introduced `scaleImage` method in `ImageUtilities`. This is essentially a duplicate of `scaleImageIcon`, with reused components separated into a shared method.
- Replaced award image scaling in `PersonViewPanel` with the new `scaleImage` method from `ImageUtilities`.
@IllianiBird IllianiBird added Bug Awards GUI Severity: Low Issues described as low severity as per the new issue form labels Apr 7, 2025
@IllianiBird IllianiBird self-assigned this Apr 7, 2025
@IllianiBird IllianiBird changed the title Fixed Display of Misc Award Images; Upgraded Award Image Scaling Fix #6546: Fixed Display of Misc Award Images; Upgraded Award Image Scaling Apr 7, 2025
Copy link

codecov bot commented Apr 7, 2025

Codecov Report

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

Project coverage is 11.41%. Comparing base (a767ba0) to head (6fb3aff).
Report is 38 commits behind head on master.

Files with missing lines Patch % Lines
MekHQ/src/mekhq/gui/view/PersonViewPanel.java 0.00% 19 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #6583      +/-   ##
============================================
- Coverage     11.41%   11.41%   -0.01%     
+ Complexity     6451     6448       -3     
============================================
  Files          1087     1088       +1     
  Lines        139675   139773      +98     
  Branches      21615    21624       +9     
============================================
+ Hits          15947    15949       +2     
- Misses       122131   122230      +99     
+ Partials       1597     1594       -3     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

# Conflicts:
#	MekHQ/src/mekhq/gui/view/PersonViewPanel.java
#	MekHQ/src/mekhq/utilities/ImageUtilities.java
@IllianiBird IllianiBird merged commit 9a0df72 into MegaMek:master Apr 11, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awards Bug GUI Severity: Low Issues described as low severity as per the new issue form
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Issue] 50.04 Awards not displaying or the award images are compressed
2 participants