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

Support per-monitor DPI #836

Closed
ongun-kanat opened this issue Apr 1, 2021 · 11 comments
Closed

Support per-monitor DPI #836

ongun-kanat opened this issue Apr 1, 2021 · 11 comments
Labels
5 - Released The issue has been resolved, and released to the public for consumption Improvement Issues that enhances existing functionality, or adds new features
Milestone

Comments

@ongun-kanat
Copy link

High-DPI displays are getting common each passing day. However, many users like me still own Low-DPI screens and use them in combination with newer High-DPI monitors. My laptop has a 1080p display and I connect it to a 4K display with 125% scaling. This causes the embedded display to be rendered 96 DPI while the 4K display to be rendered in 120 DPI.

Windows 10 has an API to support multiple displays with different DPI values (https://github.com/microsoft/WPF-Samples/tree/master/PerMonitorDPI). For applications that doesn't support this API, Windows scales the window by stretching the rendered raster of the window. Currently, Chocolatey GUI is rendered blurry if I move the window to my 4K display. Implementing per-monitor DPI support for Chocolatey GUI would provide a better user experience overall.

@gep13
Copy link
Member

gep13 commented Apr 2, 2021

@ongun-kanat thanks for raising this issue!

@punker76 is this something that MahApps can help with?

@punker76
Copy link
Member

punker76 commented Apr 2, 2021

@gep13 We can do this by targeting the Gui to v4.6.2 .Net Framework.

@gep13
Copy link
Member

gep13 commented Apr 2, 2021

@punker76 ah, gotcha. Ok, let me get back to you on that one 😄

@gep13 gep13 added the Improvement Issues that enhances existing functionality, or adds new features label Apr 12, 2021
@gep13 gep13 added this to the 0.19.0 milestone Apr 12, 2021
@gep13
Copy link
Member

gep13 commented Apr 12, 2021

@punker76 we have discussed this internally, and we have decided that we can move forward with changing the target .NET Framework version. Related issue has been created here: #841

Once we change the .NET Framework version, what else is needed from a MahApps perspective to enable high DPI support?

@punker76
Copy link
Member

@gep13 Just use highest target for MahApps (4.7) and add an app.manifest like this one

These settings are the relevant ones

https://github.com/MahApps/MahApps.Metro.IconPacks/blob/a24bc41dddd8c896949e6f6d01512ffbb14bed94/src/MahApps.Metro.IconPacks.Browser/app.manifest#L34-L42

gep13 added a commit that referenced this issue Apr 13, 2021
This should allow the support for Per-Monitor support for high DPI. In
order for this to work, we had to first move to a higher version of .NET
Framework, and also to reference the higher framework version of
MahApps.  Both of these were taken care of in this issue:

#841
@gep13
Copy link
Member

gep13 commented Apr 13, 2021

@ongun-kanat I have just made a commit into the repository that adds in the changes to the app.manifest that @punker76 suggested. This will result in a new package being pushed to our MyGet feed as a pre-release package.

Would you be willing to take this for a spin to confirm that it is now working as expected?

If so, you should be able to install the pre-release package using the following command:

choco upgrade chocolateygui --pre --version 0.19.0-alpha0169 --source https://www.myget.org/F/chocolateygui/

Please let us know if you have any problems/questions.

@punker76
Copy link
Member

@gep13 Works on my machine TM (125 %)

image

@gep13
Copy link
Member

gep13 commented Apr 13, 2021

@punker76 sweet! Will wait for @ongun-kanat to confirm, and then we can close out this issue.

gep13 added a commit to steviecoaster/ChocolateyGUI that referenced this issue Apr 13, 2021
gep13 added a commit to steviecoaster/ChocolateyGUI that referenced this issue Apr 13, 2021
Will rebase this later, just getting it done for now.
@ongun-kanat
Copy link
Author

It works great! Thank you very much!

100% - 1080p

chocolatey-gui-100

125% - 4K

chocolatey-gui-125

Install screen in 125%

install-125

@gep13
Copy link
Member

gep13 commented Apr 13, 2021

That is great! Thanks for confirming!

@gep13 gep13 closed this as completed Apr 13, 2021
@AdmiringWorm AdmiringWorm added the 4 - Done Code has been added to the repository, and has been reviewed by a team member label Jan 21, 2022
@gep13
Copy link
Member

gep13 commented Feb 10, 2022

🎉 This issue has been resolved in version 0.20.0 🎉

The release is available on:

Your GitReleaseManager bot 📦🚀

@corbob corbob added 5 - Released The issue has been resolved, and released to the public for consumption and removed 4 - Done Code has been added to the repository, and has been reviewed by a team member labels Sep 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
5 - Released The issue has been resolved, and released to the public for consumption Improvement Issues that enhances existing functionality, or adds new features
Projects
None yet
Development

No branches or pull requests

5 participants