Skip to content

Improvement: Added Utility Methods to ReportingUtilities to Allow for Easier Application of Core Colors#7000

Merged
IllianiBird merged 6 commits into
MegaMek:masterfrom
IllianiBird:colorShortcut
May 19, 2025
Merged

Improvement: Added Utility Methods to ReportingUtilities to Allow for Easier Application of Core Colors#7000
IllianiBird merged 6 commits into
MegaMek:masterfrom
IllianiBird:colorShortcut

Conversation

@IllianiBird

Copy link
Copy Markdown
Collaborator

The three core colors: positive, warning, and negative were a right pain in the bum to use. As any time you wanted to use them you had to remember (or find) MekHQ.getMHQOptions().getFontColorNegativeHexColor(). It was all very wordy and not easy to remember.

Now just hit ReportingUtilities.getPositiveColor() (or negative, or warning) and you're done.

@IllianiBird IllianiBird self-assigned this May 14, 2025
@IllianiBird IllianiBird requested a review from a team as a code owner May 14, 2025 17:45
@IllianiBird IllianiBird added Refactoring For New Dev Cycle Utility A new utility function or developer tool labels May 14, 2025
@IllianiBird IllianiBird marked this pull request as draft May 14, 2025 17:46
@codecov

codecov Bot commented May 14, 2025

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 11.51079% with 246 lines in your changes missing coverage. Please review.

Project coverage is 12.03%. Comparing base (49d3af0) to head (0fdb0f2).
Report is 29 commits behind head on master.

Files with missing lines Patch % Lines
...paign/personnel/education/EducationController.java 0.00% 40 Missing ⚠️
MekHQ/src/mekhq/campaign/Campaign.java 0.00% 24 Missing ⚠️
MekHQ/src/mekhq/campaign/finances/Finances.java 0.00% 9 Missing ⚠️
.../mekhq/campaign/stratcon/StratconRulesManager.java 0.00% 9 Missing ⚠️
MekHQ/src/mekhq/gui/StratconTab.java 0.00% 9 Missing ⚠️
MekHQ/src/mekhq/campaign/parts/MissingPart.java 0.00% 8 Missing ⚠️
MekHQ/src/mekhq/campaign/personnel/Person.java 0.00% 7 Missing ⚠️
MekHQ/src/mekhq/service/mrms/MRMSService.java 12.50% 7 Missing ⚠️
...ign/mission/resupplyAndCaches/PerformResupply.java 0.00% 6 Missing ⚠️
MekHQ/src/mekhq/campaign/CampaignSummary.java 0.00% 5 Missing ⚠️
... and 51 more
Additional details and impacted files
@@            Coverage Diff            @@
##             master    #7000   +/-   ##
=========================================
  Coverage     12.03%   12.03%           
- Complexity     6889     6891    +2     
=========================================
  Files          1103     1103           
  Lines        142284   142287    +3     
  Branches      21991    21991           
=========================================
+ Hits          17121    17124    +3     
- Misses       123328   123332    +4     
+ Partials       1835     1831    -4     

☔ 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/dialog/MekHQUnitSelectorDialog.java
@IllianiBird IllianiBird marked this pull request as ready for review May 19, 2025 23:09
@IllianiBird IllianiBird merged commit f07255c into MegaMek:master May 19, 2025
6 checks passed
@IllianiBird IllianiBird deleted the colorShortcut branch June 7, 2025 23:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Refactoring Utility A new utility function or developer tool

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant