-
Notifications
You must be signed in to change notification settings - Fork 200
Improvement: Increased Size of Information Display in Campaign Options; Stopped Panels 'Wiggling' When Displaying Lots of Information; Updated Skill Randomization Panel for Usability; Fixed Minor Bugs #8264
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
base: main
Are you sure you want to change the base?
Improvement: Increased Size of Information Display in Campaign Options; Stopped Panels 'Wiggling' When Displaying Lots of Information; Updated Skill Randomization Panel for Usability; Fixed Minor Bugs #8264
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #8264 +/- ##
============================================
- Coverage 11.72% 11.72% -0.01%
- Complexity 7532 7535 +3
============================================
Files 1271 1271
Lines 162724 162766 +42
Branches 24515 24518 +3
============================================
+ Hits 19082 19084 +2
- Misses 141644 141682 +38
- Partials 1998 2000 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR enhances the Campaign Options UI by increasing information display capacity, preventing panel width fluctuations, improving the skill randomization panel layout, and fixing several minor bugs. The changes focus on making the dynamic information display more compact (increasing word wrap from 75 to 120 characters) while establishing a consistent minimum panel width (950 scaled pixels) to eliminate "wiggling" when content changes.
Key Changes:
- Increased word wrap width from 75 to 120 characters for more compact information display
- Added CAMPAIGN_OPTIONS_PANEL_WIDTH constant and minimum width enforcement to prevent panel size fluctuations
- Reorganized skill randomization panel layout for better usability (converting from 2-column to 3-column layout)
- Fixed mouse listener bugs in FinancesTab where wrong checkboxes were referenced
- Reduced tip panel height parameters across multiple tabs to accommodate more compact display
- Renamed "RandomMarriageOppositeSexDiceSize" to "RandomMarriageDiceSize" for clarity
Reviewed Changes
Copilot reviewed 19 out of 19 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| TurnoverAndRetentionTab.java | Reduced fatigue tab tip panel height from 7 to 5 |
| SystemsTab.java | Reduced tip panel heights for reputation (10→8), faction standing (4→3), and ATOW (9→8) tabs |
| RulesetsTab.java | Reduced StratCon tab tip panel height from 6 to 4 |
| RepairAndMaintenanceTab.java | Reduced repair tab tip panel height from 4 to 3 |
| RelationshipsTab.java | Renamed marriage dice size variables, reduced tip panel heights, removed duplicate same-sex dice UI from marriage panel |
| PersonnelTab.java | Reduced tip panel heights for awards (5→4), medical (4→3), personnel info (4→3), and prisoners/dependents (9→6) tabs |
| MarketsTab.java | Reduced tip panel heights for personnel market (11→9), unit market (5→4), and contract market (5→3) tabs |
| FinancesTab.java | Fixed mouse listener bug where wrong checkboxes were used for payForFoodBox and payForHousingBox; reduced tip panel heights for general (10→8) and price multipliers (2→1) tabs |
| EquipmentAndSuppliesTab.java | Reduced tip panel heights for acquisition (4→3), planetary acquisition (14→12), and tech limits (3→2) tabs |
| BiographyTab.java | Reduced tip panel heights for general (8→6), backgrounds (5→3), and education (4→3) tabs |
| AdvancementTab.java | Reorganized skill randomization panel from 2-column to 3-column layout; converted several vertical stacks to horizontal rows; reduced XP awards (8→6) and skill randomization (12→11) tip panel heights |
| CampaignOptionsTextField.java | Removed isResourceKeyValid check from tooltip setting logic; removed unused import |
| CampaignOptionsStandardPanel.java | Added minimum/preferred size enforcement for CAMPAIGN_OPTIONS_PANEL_WIDTH (implementation has bug - creates unused JPanel instance) |
| CampaignOptionsSpinner.java | Removed isResourceKeyValid check from tooltip setting; reformatted parameter list |
| CampaignOptionsHeaderPanel.java | Refactored tooltip label creation into separate method with proper minimum/preferred size overrides |
| CampaignOptionsCheckBox.java | Removed isResourceKeyValid check from tooltip setting logic; removed unused import |
| CampaignOptionsButton.java | Removed isResourceKeyValid check from tooltip setting logic; removed unused import |
| CampaignOptionsUtilities.java | Added CAMPAIGN_OPTIONS_PANEL_WIDTH constant (950); increased word wrap from 75 to 120 characters; removed isResourceKeyValid check |
| CampaignOptionsDialog.properties | Fixed typo in UseInitiativeBonus tooltip; renamed RandomMarriageOppositeSexDiceSize to RandomMarriageDiceSize; removed warning from UseStratCon tooltip |
Comments suppressed due to low confidence (1)
MekHQ/src/mekhq/gui/campaignOptions/contents/RelationshipsTab.java:409
- Inconsistency between the variable name and the resource key. The variable is named
lblRandomMarriageDiceSize(line 99) but the component is created with the old resource key "RandomMarriageOppositeSexDiceSize". This should be updated to match the resource file which uses "RandomMarriageDiceSize".
Update to:
lblRandomMarriageDiceSize = new CampaignOptionsLabel("RandomMarriageDiceSize");
lblRandomMarriageDiceSize.addMouseListener(createTipPanelUpdater(marriageHeader,
"RandomMarriageDiceSize"));
spnRandomMarriageDiceSize = new CampaignOptionsSpinner("RandomMarriageDiceSize",
5000, 0, 100000, 1);
spnRandomMarriageDiceSize.addMouseListener(createTipPanelUpdater(marriageHeader,
"RandomMarriageDiceSize")); lblRandomMarriageDiceSize = new CampaignOptionsLabel("RandomMarriageOppositeSexDiceSize");
lblRandomMarriageDiceSize.addMouseListener(createTipPanelUpdater(marriageHeader,
"RandomMarriageOppositeSexDiceSize"));
spnRandomMarriageDiceSize = new CampaignOptionsSpinner("RandomMarriageOppositeSexDiceSize",
5000, 0, 100000, 1);
spnRandomMarriageDiceSize.addMouseListener(createTipPanelUpdater(marriageHeader,
"RandomMarriageOppositeSexDiceSize"));
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This PR predominantly updates the dynamic information display in Campaign Options so that it can show more information in fewer lines. While I was at it I also went ahead and increased the default width of options panels so that when the maximum line width is reached (in the dynamic information display panel) it wouldn't cause the width of the panel to 'wiggle'.
I also spotted a couple of minor bugs not worth going into. They've been fixed now.
Finally I changed the arrangement of options in the skill randomization tab so that it would be easier to see the information panel when reviewing options.