-
-
Notifications
You must be signed in to change notification settings - Fork 472
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
Fix and enhance High DPI support in wxpython.py example #399
Comments
cztomczak
changed the title
Fix High DPI support in wxpython.py example
Fix and enhance High DPI support in wxpython.py example
Aug 16, 2018
Done in rev e6bcf2c. |
This issue was closed.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
wxpython.py example enables High DPI support on Windows with this code:
However window size is not scaled during window creation, thus initial window size will be small on High DPI devices. The solution is to call
cef.DpiAware.CalculateWindowSize(WIDTH, HEIGHT)
and pass these new units towx.Frame.__init__
. Currently there is a bug andcef.DpiAware.CalculateWindowSize
throws an error, this needs to be fixed in Issue #398. Temporarily you could use pywin32/ctypes extensions to get system dpi settings, this would require translating this C++ code to a Python equivalent:cefpython/src/client_handler/dpi_aware.cpp
Line 129 in 824d7ce
New window size should not exceed desktop work area (area without the taskbar etc). This working area can be fetched using wx.GetClientDisplayRect().Get().
The text was updated successfully, but these errors were encountered: