mirror of
https://github.com/ankitects/anki.git
synced 2025-09-25 01:06:35 -04:00
opt in to qt's new non-integer scaling
This commit is contained in:
parent
b9f564f49a
commit
ff6b58c265
2 changed files with 6 additions and 1 deletions
|
@ -310,6 +310,9 @@ def _run(argv=None, exec=True):
|
|||
# opt in to full hidpi support?
|
||||
if not os.environ.get("ANKI_NOHIGHDPI"):
|
||||
QCoreApplication.setAttribute(Qt.AA_EnableHighDpiScaling)
|
||||
os.environ["QT_ENABLE_HIGHDPI_SCALING"] = "1"
|
||||
os.environ["QT_SCALE_FACTOR_ROUNDING_POLICY"] = "PassThrough"
|
||||
|
||||
|
||||
# Opt into software rendering. Useful for buggy systems.
|
||||
if os.environ.get("ANKI_SOFTWAREOPENGL"):
|
||||
|
|
|
@ -200,7 +200,9 @@ class AnkiWebView(QWebEngineView): # type: ignore
|
|||
if isLin:
|
||||
factor = max(1, factor)
|
||||
return factor
|
||||
# compensate for qt's integer scaling on windows
|
||||
# compensate for qt's integer scaling on windows?
|
||||
if qtminor >= 14:
|
||||
return 1
|
||||
qtIntScale = self._getQtIntScale(screen)
|
||||
desiredScale = factor * qtIntScale
|
||||
newFactor = desiredScale / qtIntScale
|
||||
|
|
Loading…
Reference in a new issue