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

Added Font Scaling Helper Methods to FlatLafStyleBuilder #6116

Closed
wants to merge 5 commits into from

Conversation

IllianiCBT
Copy link
Collaborator

Implemented new static methods to allow setting font scaling for JComponents. These helper functions are designed to streamline usage of the FlatLafStyleBuilder.

Implemented new static methods to allow setting font scaling for `JComponents` with optional bold text and custom font names. These helper functions are designed to streamline usage of the `FlatLafStyleBuilder`.
Replaced direct font builder calls with a static setFontScaling method in both MMToggleButton and ScenarioInfoPanel classes. This change promotes code reuse and simplifies the font scaling process for UI components.
Replaced direct font style application with setFontScaling method. This change improves readability and maintainability by centralizing font scaling logic.
A new method `setFontScaling` was added to set font scaling for a component with default parameters. This method simplifies setting the default font ("MekHQ"), with no bold text, and a default size of 1.
@IllianiCBT IllianiCBT self-assigned this Oct 18, 2024
@IllianiCBT IllianiCBT added the Scaling Work dealing with scaling issues label Oct 18, 2024
Replaced hardcoded "MekHQ" font with MMConstants.FONT_DIALOG to improve consistency and maintainability. This change ensures that the default dialog font is used throughout the application, facilitating easier future updates.
@IllianiCBT
Copy link
Collaborator Author

I've had second thoughts about these changes. Closing branch.

@IllianiCBT IllianiCBT closed this Oct 18, 2024
Copy link

codecov bot commented Oct 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 29.07%. Comparing base (967cee2) to head (ce4fd19).
Report is 22 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #6116      +/-   ##
============================================
- Coverage     29.07%   29.07%   -0.01%     
+ Complexity    13971    13970       -1     
============================================
  Files          2601     2601              
  Lines        267448   267458      +10     
  Branches      47758    47758              
============================================
- Hits          77765    77764       -1     
- Misses       185788   185798      +10     
- Partials       3895     3896       +1     

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Scaling Work dealing with scaling issues Utility
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant