File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change 44# To install wxPython on Linux type "sudo apt-get install python-wxtools".
55
66# Tested with wxPython 2.8 on Linux, wxPython 3.0 on Windows/Mac
7- # and CEF Python v55.3.
7+ # and CEF Python v55.3+ .
88
99import wx
1010from cefpython3 import cefpython as cef
2222def main ():
2323 check_versions ()
2424 sys .excepthook = cef .ExceptHook # To shutdown all CEF processes on error
25- cef .Initialize ()
25+ settings = {}
26+ if WINDOWS :
27+ # High DPI support
28+ settings ["auto_zooming" ] = "system_dpi"
29+ # Embed DPI awareness xml manifest inside .exe (recommended,
30+ # most reliable) or call the SetProcessDpiAware function.
31+ # noinspection PyUnresolvedReferences
32+ cef .DpiAware .SetProcessDpiAware ()
33+ cef .Initialize (settings = settings )
2634 app = CefApp (False )
2735 app .MainLoop ()
2836 del app # Must destroy before calling Shutdown
You can’t perform that action at this time.
0 commit comments