Open KirillAlekseeenko opened 3 weeks ago
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.
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 gettingint w = GetSystemMetrics(SM_CXSCREEN), h = GetSystemMetrics(SM_CYSCREEN);
works fine. But UI looks smaller and probably needs to be scaled up accordingly.