Skip to content

Commit

Permalink
Merge pull request #96 from labscript-suite/high-dipi
Browse files Browse the repository at this point in the history
Set some Qt settings to play nicer on High DPI displays
  • Loading branch information
chrisjbillington authored Apr 18, 2023
2 parents fb122b3 + d07618a commit d14cb74
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions labscript_utils/splash.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,15 @@
Qt = QtCore.Qt


# Set auto high-DPI scaling - this ensures pixel metrics are scaled
# appropriately so that we don't get a weird mix of large fonts and small
# everything else on High DPI displays:
QtWidgets.QApplication.setAttribute(Qt.AA_EnableHighDpiScaling, True)
# Use high res pixmaps if available, instead of rendering at low resolution and
# upscaling:
QtWidgets.QApplication.setAttribute(Qt.AA_UseHighDpiPixmaps, True)


class Splash(QtWidgets.QFrame):
w = 250
h = 230
Expand Down

0 comments on commit d14cb74

Please sign in to comment.