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

when restoring window size use the DPI scale factor #4407

Merged
merged 1 commit into from
Dec 9, 2023

Conversation

ykarpeev
Copy link

@ykarpeev ykarpeev commented Jun 8, 2023

Describe the changes you have made to improve this project

I noticed that restoring the window size wasn't very consistent - and on a brand new test project it would get smaller each time it was opened and closed. Reviewing the code it looks like WindowPlacementSetting uses the DPI to adjust the scale factor when saving the settings - but that isn't used when restoring the window. This change takes the DPI scale factor into account when restoring.

This fixes the issue for me. Don't have enough experience with the codebase to add a unit test.

@ykarpeev
Copy link
Author

ykarpeev commented Jun 8, 2023

@dotnet-policy-service agree

@punker76 punker76 added this to the 3.0.0 milestone Dec 9, 2023
@punker76 punker76 merged commit 183f421 into MahApps:develop Dec 9, 2023
4 of 5 checks passed
@punker76
Copy link
Member

punker76 commented Dec 9, 2023

@ykarpeev your changes have been merged, thanks for your contribution 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

2 participants