Enable high-DPI scaling where available
This commit is contained in:
parent
a5c14aa7d9
commit
7f23ac44e0
@ -15,6 +15,10 @@ from syncplay.vendor.Qt import QtCore, QtWidgets, QtGui, __binding__, IsPySide,
|
|||||||
from syncplay.vendor.Qt.QtCore import Qt, QSettings, QCoreApplication, QSize, QPoint, QUrl, QLine, QEventLoop, Signal
|
from syncplay.vendor.Qt.QtCore import Qt, QSettings, QCoreApplication, QSize, QPoint, QUrl, QLine, QEventLoop, Signal
|
||||||
from syncplay.vendor.Qt.QtWidgets import QApplication, QLineEdit, QLabel, QCheckBox, QButtonGroup, QRadioButton, QDoubleSpinBox, QPlainTextEdit
|
from syncplay.vendor.Qt.QtWidgets import QApplication, QLineEdit, QLabel, QCheckBox, QButtonGroup, QRadioButton, QDoubleSpinBox, QPlainTextEdit
|
||||||
from syncplay.vendor.Qt.QtGui import QCursor, QIcon, QImage, QDesktopServices
|
from syncplay.vendor.Qt.QtGui import QCursor, QIcon, QImage, QDesktopServices
|
||||||
|
if hasattr(QtCore.Qt, 'AA_EnableHighDpiScaling'):
|
||||||
|
QtWidgets.QApplication.setAttribute(QtCore.Qt.AA_EnableHighDpiScaling, True)
|
||||||
|
if hasattr(QtCore.Qt, 'AA_UseHighDpiPixmaps'):
|
||||||
|
QtWidgets.QApplication.setAttribute(QtCore.Qt.AA_UseHighDpiPixmaps, True)
|
||||||
if IsPySide2:
|
if IsPySide2:
|
||||||
from PySide2.QtCore import QStandardPaths
|
from PySide2.QtCore import QStandardPaths
|
||||||
|
|
||||||
|
|||||||
@ -19,8 +19,12 @@ from syncplay.utils import resourcespath
|
|||||||
from syncplay.utils import isLinux, isWindows, isMacOS
|
from syncplay.utils import isLinux, isWindows, isMacOS
|
||||||
from syncplay.utils import formatTime, sameFilename, sameFilesize, sameFileduration, RoomPasswordProvider, formatSize, isURL
|
from syncplay.utils import formatTime, sameFilename, sameFilesize, sameFileduration, RoomPasswordProvider, formatSize, isURL
|
||||||
from syncplay.vendor import Qt
|
from syncplay.vendor import Qt
|
||||||
from syncplay.vendor.Qt import QtWidgets, QtGui, __binding__, __binding_version__, __qt_version__, IsPySide, IsPySide2
|
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
|
from syncplay.vendor.Qt.QtCore import Qt, QSettings, QSize, QPoint, QUrl, QLine, QDateTime
|
||||||
|
if hasattr(QtCore.Qt, 'AA_EnableHighDpiScaling'):
|
||||||
|
QtWidgets.QApplication.setAttribute(QtCore.Qt.AA_EnableHighDpiScaling, True)
|
||||||
|
if hasattr(QtCore.Qt, 'AA_UseHighDpiPixmaps'):
|
||||||
|
QtWidgets.QApplication.setAttribute(QtCore.Qt.AA_UseHighDpiPixmaps, True)
|
||||||
if IsPySide2:
|
if IsPySide2:
|
||||||
from PySide2.QtCore import QStandardPaths
|
from PySide2.QtCore import QStandardPaths
|
||||||
if isMacOS() and IsPySide:
|
if isMacOS() and IsPySide:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user