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

Fix HiDPI issues related to image loading #235

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

Conversation

gyk
Copy link

@gyk gyk commented Dec 17, 2021

When working on some HiDPI application, I find I have to manually scale the size attribute of nwg_resource for loading Bitmaps/Icons/ImageLists properly. This PR tries to fix it.

@gyk
Copy link
Author

gyk commented Jan 24, 2022

Update: In case GetDeviceCaps returns 0, USER_DEFAULT_SCREEN_DPI should be used for DPI instead, as does in https://github.com/microsoft/PowerToys/blob/v0.53.3/src/modules/fancyzones/FancyZonesLib/util.cpp#L130. Otherwise logical_to_physical will panic.

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.

1 participant