-
Notifications
You must be signed in to change notification settings - Fork 76
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
Not using high DPI #49
Comments
This could be the answer: https://github.com/c-smile/sciter-sdk/blob/master/demos/usciter/win-res/dpi-aware.manifest |
Yeah, that’d do it. My understanding from a couple of projects in the past that have spent quite a bit of effort on optimal high-DPI support is that for best compatibility DLL calls are preferred to manifests—to say nothing of manifests not fitting particularly well into Rust’s compilation model at present. |
Sounds reasonable. Are you talking about Though it'd be better to have such a function in the Sciter API rather than in each binding. But we can do it here as well. |
I don’t recall which precise DLL calls were involved, but that looks about right (though I’ve never seen it done at the thread level, only the process level). I recall compatibility across multiple versions of Windows (e.g. trying DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2 first, then DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE, then DPI_AWARENESS_CONTEXT_SYSTEM_AWARE, or something) being a little fiddly. |
winit is the primary experience I’ve had of being involved with high-quality and high-compatibility DPI awareness: it started in rust-windowing/winit#332 for Windows, and ended up landing in rust-windowing/winit#548. The current code for it on Windows is in src/platform/windows/dpi.rs: I expect that to be a very useful resource. (See also the shared file src/dpi.rs.) |
Yes, there is a group of them: SetThreadDpiAwarenessContext is for Windows 10 1607 or higher Anyway, thanks for pointing this out. I'll try to come up with something. Ideally, this should be enabled by default with an option to opt out. And thanks for the links, they are very thorough. |
I don’t know exactly where the fault may be, but when I run the examples they’re all low DPI on my 200% scaling factor Windows device. I know that Sciter itself must be capable of running high-DPI, because I tried out the HTML Notepad app and it’s scaled properly.
The text was updated successfully, but these errors were encountered: