Damien Elmes 2017-11-27 11:01:15 +10:00
parent 77bb67a555
commit 41205bd5ca
2 changed files with 8 additions and 3 deletions

View File

@ -258,8 +258,9 @@ def _run(argv=None, exec=True):
import ctypes
ctypes.CDLL('libGL.so.1', ctypes.RTLD_GLOBAL)
# opt in to full hidpi support
QCoreApplication.setAttribute(Qt.AA_EnableHighDpiScaling)
# opt in to full hidpi support?
if not os.environ.get("ANKI_NOHIGHDPI"):
QCoreApplication.setAttribute(Qt.AA_EnableHighDpiScaling)
# create the app
app = AnkiApp(argv)

View File

@ -159,7 +159,11 @@ class AnkiWebView(QWebEngineView):
oldFocus.setFocus()
def zoomFactor(self):
from aqt import mw
# overridden scale factor?
webscale = os.environ.get("ANKI_WEBSCALE")
if webscale:
return float(webscale)
if isMac:
return 1
screen = QApplication.desktop().screen()