Don't enable DPI scaling in Linux (#257)

This commit is contained in:
et0h 2020-05-16 17:40:16 +01:00
parent dafaf93441
commit 734b425c7f

View File

@ -21,10 +21,15 @@ from syncplay.utils import formatTime, sameFilename, sameFilesize, sameFiledurat
from syncplay.vendor import Qt
from syncplay.vendor.Qt import QtCore, QtWidgets, QtGui, __binding__, __binding_version__, __qt_version__, IsPySide, IsPySide2
from syncplay.vendor.Qt.QtCore import Qt, QSettings, QSize, QPoint, QUrl, QLine, QDateTime
applyDPIScaling = True
if isLinux():
applyDPIScaling = False
else:
applyDPIScaling = True
if hasattr(QtCore.Qt, 'AA_EnableHighDpiScaling'):
QtWidgets.QApplication.setAttribute(QtCore.Qt.AA_EnableHighDpiScaling, True)
QtWidgets.QApplication.setAttribute(QtCore.Qt.AA_EnableHighDpiScaling, applyDPIScaling)
if hasattr(QtCore.Qt, 'AA_UseHighDpiPixmaps'):
QtWidgets.QApplication.setAttribute(QtCore.Qt.AA_UseHighDpiPixmaps, True)
QtWidgets.QApplication.setAttribute(QtCore.Qt.AA_UseHighDpiPixmaps, applyDPIScaling)
if IsPySide2:
from PySide2.QtCore import QStandardPaths
if isMacOS() and IsPySide: