-
Notifications
You must be signed in to change notification settings - Fork 9
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
Please make the demo project DPI-aware #9
Comments
Ok, thanks for that. I was already aware of this manifest setting, but what I need a better understanding of is exactly what happens 'under the hood'. |
Before applying this, the system simply scales the interface to a larger size as a bitmap when working with high-DPI environment. After applying this, you can see that all text on the interface is crisp and the #8 issue that the close button is relatively small since the application now is responsible for sizing and painting the close button. |
Well, I'm baffled here. I don't have a high DPI monitor, but I do have two Surface Pro's with native resolutions of 1920x1080 and 2160x1440. Their screens are presumably192dpi, so I would think that counts as high DPI. If I run the demo project on these, with the resolution set to the native, then no matter what I set the scaling to via the Windows display settings, everything is crisp and clean. This is true even if I compile the demo app without a manifest. Also if I set the AutoScaleMode property in the form to Dpi (as opposed to None), the app displays at the same size no matter how the resolution and scaling are set. In other words, I'm not able to replicate your problem with the equipment available to me. Perhaps using a 4K display would show the problem, but I don't really see why that should make any difference, especially since the actual DPI on large 4K monitors is considerably less than on the Surface screens. (I am actually considering buying a 32" 4K monitor, but this probably won't be imminent.) So I'd be grateful if you could supply answers to the following:
Thanks. |
Sorry for the long delay in getting back to this. Actually I've spent quite a bit of time looking at this, and my problem is that on my systems I can't replicate what you observe at all. The most peculiar thing about your screenshots is that the sizes of the tabs are completely different between the left and right images, as is the tab page area. Also the form's title bar is a different colour. I find it hard to believe that these images were created from the same source code and that the only difference is the presence or absence of the manifest. And in fact the manifest really is irrelevant for this simple app. If you read up on the technical details of what the dpiaware setting does, there's nothing of relevance to this app, apart from single-pass versus multi-pass scaling. It's just possible that the difference between what you see and what I see is that your windows 10 version is rather out-of-date. I doubt that this would account for it, but it will be interesting to see what happens when you move up to a more current version. |
app.zip
You can add the above app.manifest file and use it in the demo project's Manifest property.
After that, it is DPI-aware.
Tab height will be automatically adjusted in various DPI settings.
The text was updated successfully, but these errors were encountered: