Comments (6)
This could be the answer: https://github.com/c-smile/sciter-sdk/blob/master/demos/usciter/win-res/dpi-aware.manifest
from rust-sciter.
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.
from rust-sciter.
Sounds reasonable. Are you talking about SetThreadDpiAwarenessContext
& K°?
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.
from rust-sciter.
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.
from rust-sciter.
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.)
from rust-sciter.
Yes, there is a group of them:
SetThreadDpiAwarenessContext is for Windows 10 1607 or higher
SetProcessDpiAwarenessContext is for 1703 at least
SetThreadDpiHostingBehavior is for 1803
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.
from rust-sciter.
Related Issues (20)
- `sciter::Value` missing the `Sync` marker HOT 1
- can't throw exception from Rust HOT 4
- warning! unknown event group with latest sdk HOT 6
- Could provide example to load resource files(html, icon, css, js) from disk? HOT 2
- How to use `set_variable`? HOT 8
- Image::with_data( ) always say "Access violation" HOT 2
- Window as arguments cause error HOT 1
- video example crashes on win32 HOT 1
- How to load the Sciter static library in Windows? HOT 3
- why call set_options blocked the application
- WebView does not work HOT 6
- Sciter 5 support HOT 7
- When load zip archive with password is supported?
- macOS app quits after closing first frame on sciter 5
- Unsound implementation of `video::AssetPtr::<T>::get`
- Can use OpenGL? HOT 1
- Library causes sciter-sdk is not running correctly
- Windowless example with sciter.lite does not work HOT 1
- Render into bitmap callback is too slow.
- value.rs "ensure_tmp_mut" error HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rust-sciter.