A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/cztomczak/cefpython/issues/399 below:

Fix and enhance High DPI support in wxpython.py example · Issue #399 · cztomczak/cefpython · GitHub

wxpython.py example enables High DPI support on Windows with this code:

if WINDOWS:
        # noinspection PyUnresolvedReferences, PyArgumentList
        cef.DpiAware.EnableHighDpiSupport()

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 to wx.Frame.__init__. Currently there is a bug and cef.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:

void GetSystemDpi(int* dpix, int* dpiy) {

New window size should not exceed desktop work area (area without the taskbar etc). This working area can be fetched using wx.GetClientDisplayRect().Get().


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4