File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 98
98
99
99
def enable_hidpi ():
100
100
"""Enable high-res displays."""
101
+ try :
102
+ set_dpi_aware = QtCore .__version_info__ < (6 , 4 )
103
+ except Exception :
104
+ set_dpi_aware = True
101
105
try :
102
106
# See https://github.com/pyzo/pyzo/pull/700 why we seem to need both
103
- ctypes .windll .shcore .SetProcessDpiAwareness (1 ) # global dpi aware
104
- ctypes .windll .shcore .SetProcessDpiAwareness (2 ) # per-monitor dpi aware
107
+ # See https://github.com/pygfx/pygfx/issues/368 for high Qt versions
108
+ if set_dpi_aware :
109
+ ctypes .windll .shcore .SetProcessDpiAwareness (1 ) # global dpi aware
110
+ ctypes .windll .shcore .SetProcessDpiAwareness (2 ) # per-monitor dpi aware
105
111
except Exception :
106
112
pass # fail on non-windows
107
113
try :
You can’t perform that action at this time.
0 commit comments