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

Need to take OS scale into account when calculating resolution #67

Open
KirillAlekseeenko opened this issue Aug 19, 2024 · 1 comment
Open

Comments

@KirillAlekseeenko
Copy link
Contributor

For example, on my machine I set 125% scale and can get only 864p instead of 1080p

On Windows 11 calling SetThreadDpiAwarenessContext(DPI_AWARENESS_CONTEXT_SYSTEM_AWARE); before getting
int w = GetSystemMetrics(SM_CXSCREEN), h = GetSystemMetrics(SM_CYSCREEN); works fine. But UI looks smaller and probably needs to be scaled up accordingly.

@Try
Copy link
Owner

Try commented Aug 24, 2024

Hi, @KirillAlekseeenko !

Dpi awareness is not implemented in engine, as I do not yet have consistent vision/idea on how engine-level api should look-like.
Maybe we can keep it simple like on MacOS and provide a single getter for UI-scale; maybe it need to be complement with auto-scaling for Tempest::Widget or even Tempest::Painter.

However I must admit that problem running OpenGothic in HiDpi exist. For now only working solution would be to set INTERFACE Scale to value bigger than one, in SystemPack.ini file.

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

No branches or pull requests

2 participants