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
get current DPI of a window #3003
Comments
We generally don't expose the DPI, but we do track the device pixel ratio (we call it scale factor). This is exposed in Rust, but not in C++. I've made a PR for the C++ side. |
It will be nice if you'll expose also the DPI values . |
Maybe we could have API to expose the physical dimension of the monitor (along with other monitor related information). I think with Qt that could be computed, but with winit we don't have access to that information. Out of curiosity, what information do you need (horizontal or vertical dpi? logical or physical dpi?) and how would you use it? |
@tronical Logical DPI is needed to render text using 3rdparty libs e.g. render a scene with some texts into a texture then use I think Physical dimensions are also good to know, though right now I don't have a use-case for them. |
Right now there is no API to get the current DPI used by a
slint::Window
.The text was updated successfully, but these errors were encountered: