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

tip of the day #6841

Open
wants to merge 20 commits into
base: master
Choose a base branch
from
Open

tip of the day #6841

wants to merge 20 commits into from

Conversation

exeea
Copy link
Collaborator

@exeea exeea commented Apr 7, 2025

add common Tip Of The Day implementation with i18n support.

@exeea exeea requested a review from rjhancock April 7, 2025 02:25
Copy link

codecov bot commented Apr 7, 2025

Codecov Report

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

Project coverage is 30.04%. Comparing base (95a1af5) to head (1ab265e).
Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
megamek/src/megamek/common/util/TipOfTheDay.java 0.00% 99 Missing ⚠️
...gamek/src/megamek/client/ui/swing/util/UIUtil.java 0.00% 32 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #6841      +/-   ##
============================================
- Coverage     30.05%   30.04%   -0.02%     
+ Complexity    15587    15579       -8     
============================================
  Files          2875     2876       +1     
  Lines        282748   282872     +124     
  Branches      49302    49316      +14     
============================================
- Hits          84988    84981       -7     
- Misses       192210   192336     +126     
- Partials       5550     5555       +5     

☔ 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.

@exeea exeea requested a review from rjhancock April 7, 2025 02:43
Copy link
Member

@pavelbraginskiy pavelbraginskiy left a comment

Choose a reason for hiding this comment

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

On lower-resolution screens the tip is too large relative to the splash.

@rjhancock
Copy link
Collaborator

On lower-resolution screens the tip is too large relative to the splash.

That would be due to the hints. What they do internally is essentially double the size of the render and scale it down. On HiDPI/Retina screens they show correctly. On "normal" screens they are twice the size.

Or that is my theory on it anyways.

@rjhancock
Copy link
Collaborator

Instead of rending to a Graphics context, why not render to a Swing object that can be inserted somewhere on the screen?

@exeea
Copy link
Collaborator Author

exeea commented Apr 7, 2025

Originally I did that with a layeredpane but I was getting very bad aliasing and ugly stroke. This was the most visually pleasing approach.

@exeea exeea requested a review from pavelbraginskiy April 8, 2025 00:04
Copy link
Collaborator

@rjhancock rjhancock left a comment

Choose a reason for hiding this comment

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

The license header needs to be updated to the correct version and you'll need to update latest master into this and fix the calls to the Internationalization class to I18N.

Almost there.

@exeea exeea requested a review from rjhancock April 12, 2025 11:44
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.

3 participants