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

Return the screen size in logical pixels, not screen pixels. #7030

Merged
merged 1 commit into from
Jul 4, 2020
Merged

Return the screen size in logical pixels, not screen pixels. #7030

merged 1 commit into from
Jul 4, 2020

Conversation

asvitkine
Copy link
Contributor

@asvitkine asvitkine commented Jul 3, 2020

Return the screen size in logical pixels, not screen pixels.

This way, if the user has magnification turned on in Windows, the returned size is correspondingly scaled down. This is the
behavior that we want, as we use this size to compare against Swing UI sizes, which is in logical pixels (gets scaled by the system setting).

Functional Changes

[] New map or map update
[] New Feature
[] Feature update or enhancement
[] Feature Removal
[] Code Cleanup or refactor
[] Configuration Change
[X] Problem fix: #6825
[] Other:

Testing

Tested on Windows 10 by changing the magnification setting and verifying the new method returns the scaled size (different from the previous implementation which was the unscaled size).

Release Note

Fixes combat window sizing with Windows 10 magnification

This way, if the user has magnification turned on in Windows,
the returned size is correspondingly scaled down. This is the
behavior that we want, as we use this size to compare against
Swing UI sizes, which is in logical pixels (gets scaled by
the system setting).
Copy link
Member

@RoiEXLab RoiEXLab left a comment

Choose a reason for hiding this comment

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

Thanks for looking into this 👍

@RoiEXLab RoiEXLab merged commit 2e8a935 into triplea-game:master Jul 4, 2020
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.

Combat results dialogue box too big
2 participants