Demo showcasing the best practices for high DPI
A couple of weeks ago, I tried to make the GUI of my project support High-DPI, especially on Windows. I wanted to see what were the extent of changes needed. I was surprised to find so little information. The built-in demo software was surprisingly not beautiful. There's a little bit of info on the points to use FromDIP though.
I searched a bit even on the wxWidgets side to see their guidance. Since making an application manifest, the kinda recommended way isn't really possible for Python apps here, we need to use other ways or calls. I managed to see examples of using the Per-monitor v2, but changing from one monitor to another was destructive for the layout (especially if having different scaling on each). When I say destructive, is that moving to one would change the sizes/positions weirdly, and moving back would change again, but even worse. There were weird issues with the html viewer too, all lines stayed stretched and spaced out.
But it wasn't enough to really be per monitor v2, task manager only confirmed the level under. (I'm on windows 11). What kinda worked, was to use the newer SetThreadDpiAwarenessContext (https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-setthreaddpiawarenesscontext ) through ctypes, but felt a little hacky. I can't find the link of the demo I used right away, but this is close: https://stackoverflow.com/questions/78049816/how-to-override-dpi-scaling-performed-by-the-system-in-pyqt5-app
So, I'd like to have the official demos showcasing the best practices for having nice High-DPI applications with wxPython.